The Messenger of Allah ﷺ entered the mosque, and there was a man who had finished his prayer and was reciting the tashahhud. He said, "O Allah, I ask You, Allah, by the fact that You are the One, the Unique, the Self-Sufficient, who has not begotten and was not begotten, and there is none equal to Him, that You forgive me my sins, for You are the Most Forgiving, the Most Merciful."The Messenger of Allah ﷺ said three times, "He has been forgiven."
أخبرنا عمرو بن يزيد أبو بريد البصري عن عبد الصمد بن عبد الوارث قال حدثنا أبي قال حدثنا حسين المعلم عن ابن بريدة قال حدثني
أن رسول الله ﷺ دخل المسجد إذا رجل قد قضى صلاته وهو يتشهد فقال اللهم إني أسألك يا ألله بأنك الواحد الأحد الصمد الذي لم يلد ولم يولد ولم يكن له كفوا أحد أن تغفر لي ذنوبي إنك أنت الغفور الرحيم فقال رسول الله ﷺ قد غفر له ثلاثا
Its isnad is sahih. Abu Dawud narrated it in the Book of Prayer, chapter on what is said after the tashahhud, hadith 985, from the hadith of Abdul-Warith, with this wording. It is also in al-Kubra, hadith 1224. Ibn Khuzayma graded it sahih, hadith 724, as did Hakim, 1/267, saying it meets the standard of the two Shaykhs, and Dhahabi agreed with him.