Abu Barzah reported: The Messenger of Allah, peace and blessings be upon him, would say some final words when intended to leave an assembly, “O Allah, glory and praise be to you. I testify there is no God but you, I ask your forgiveness, and I repent to you.” A man once said to him, “O Messenger of Allah, you spoke words you have not in the past.” The Prophet said, “It is an expiation for what is done in the assembly.”
Source: Sunan Abī Dāwūd 4859
Grade: Sahih (authentic) according to Al-Arna’ut
عَنْ أَبِي بَرْزَةَ الْأَسْلَمِيِّ قَالَ كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَقُولُ بِأَخَرَةٍ إِذَا أَرَادَ أَنْ يَقُومَ مِنْ الْمَجْلِسِ سُبْحَانَكَ اللَّهُمَّ وَبِحَمْدِكَ أَشْهَدُ أَنْ لَا إِلَهَ إِلَّا أَنْتَ أَسْتَغْفِرُكَ وَأَتُوبُ إِلَيْكَ فَقَالَ رَجُلٌ يَا رَسُولَ اللَّهِ إِنَّكَ لَتَقُولُ قَوْلًا مَا كُنْتَ تَقُولُهُ فِيمَا مَضَى فَقَالَ كَفَّارَةٌ لِمَا يَكُونُ فِي الْمَجْلِسِ
4859 سنن أبي داود كتاب الأدب باب في كفارة المجلس
4859 المحدث شعيب الأرناؤوط خلاصة حكم المحدث صحيح في تخريج سنن أبي داود