Mishkat al-Masabih 2450
وَعَنْ عَائِشَةَ قَالَتْ: إِنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ كَانَ إِذَا جَلَسَ مَجْلِسًا أَوْ صَلَّى تكلَّم بِكَلِمَاتٍ فَسَأَلْتُهُ عَنِ الْكَلِمَاتِ فَقَالَ: إِنْ تُكُلِّمَ بِخَيْرٍ كَانَ طَابَعًا عَلَيْهِنَّ إِلَى يَوْمِ الْقِيَامَةِ وَإِنْ تُكُلِّمَ بِشَرٍّ كَانَ كَفَّارَةً لَهُ: سُبْحَانَكَ اللَّهُمَّ وَبِحَمْدِكَ لَا إِلَهَ إِلَّا أَنْتَ أَسْتَغْفِرُكَ وَأَتُوبُ إِلَيْكَ . رَوَاهُ النَّسَائِيّ
From ʿAʾishah, who said: When the Messenger of Allah ﷺ sat in a gathering or prayed, he would speak some words. I asked him about the words, and he said: "If good has been spoken, they are a seal upon it until the Day of Resurrection; and if evil has been spoken, they are an expiation for him: Glorified are You, O Allah, and praised. There is no god but You. I seek Your forgiveness and repent to You." Reported by an-Nasaʾi.