Hadithcore
Mishkat al-Masabih, 2450

‘A'isha said that when God’s messenger sat in an assembly or prayed he spoke some words, so she asked him about them. Saying that they were, “Glory be to You, O God, and I begin with praise of You; there is no god but You; I ask forgiveness of You and turn to You in repentance,” he told her that if one speaks what is good this will act as a seal on his words till the day of resurrection, and that if one speaks what is evil this will act as an atonement for what he has said. Nasa’i transmitted it.

وَعَنْ عَائِشَةَ قَالَتْ: إِنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ كَانَ إِذَا جَلَسَ مَجْلِسًا أَوْ صَلَّى تكلَّم بِكَلِمَاتٍ فَسَأَلْتُهُ عَنِ الْكَلِمَاتِ فَقَالَ:

إِنْ تُكُلِّمَ بِخَيْرٍ كَانَ طَابَعًا عَلَيْهِنَّ إِلَى يَوْمِ الْقِيَامَةِ وَإِنْ تُكُلِّمَ بِشَرٍّ كَانَ كَفَّارَةً لَهُ: سُبْحَانَكَ اللَّهُمَّ وَبِحَمْدِكَ لَا إِلَهَ إِلَّا أَنْتَ أَسْتَغْفِرُكَ وَأَتُوبُ إِلَيْكَ

. رَوَاهُ النَّسَائِيّ

References1 variant
In-Book Reference
Book 9, Hadith 219