He sat in a gathering, and when those present were about to rise, he said, "Glory be to You, O Allah, and praise be to You. I bear witness that there is no god but You. I seek Your forgiveness and turn to You in repentance."A man from the group asked, "What is this saying, Messenger of Allah ﷺ?"He ﷺ replied, "These are words that Jibreel taught me. They are an expiation for whatever wrongs may have occurred in the gathering."
أنه جلس مجلسا فلما أرادوا أن يقوم قال: سبحانك اللهم وبحمدك، أشهد أن لا إله إلا أنت، أستغفرك وأتوب إليك. قال: فقال رجل من القوم: ما هذا الحديث يا رسول الله ﷺ؟ قال ﷺ: كلمات علمنيهن جبريل عليه السلام كفارات الخطايا المجلس.
Abu Bakr bin Abu Shayba narrated it in his Musnad, as found in Matalib Aliyah (3383), from Abu Ahwas, from Abu Farwa, from Abu Mashar, who said, "A man among the companions of the Messenger of Allah ﷺ told us," and he then related it.Ibn Hajar said in Matalib Aliyah, "Its isnad is sahih, and Abu Mashar was a Kufan whose name was Ziyad bin Kulayb." He also graded it sahih in Nukat (2/739).