Hadithcore
Mishkat al-Masabih, 1019

‘Imran b. Husain said that the Prophet (ﷺ) led them in prayer and forgot something, so he made two prostrations, then uttered the <i>shahada</i>, then gave the salutation. Tirmidhi transmitted it and said this is a <i>hasan gharib</i> tradition.

عَنْ عِمْرَانَ بْنِ حُصَيْنٍ: أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ صَلَّى بهم فَسَهَا فَسجدَ سَجْدَتَيْنِ ثُمَّ تَشَهَّدَ ثُمَّ سَلَّمَ. رَوَاهُ التِّرْمِذِيُّ وَقَالَ: هَذَا حَدِيثٌ حَسَنٌ غَرِيبٌ

References1 variant
In-Book Reference
Book 4, Hadith 438