Sunan An-Nasa'i - سنن النسائي
13. The Book of Forgetfulness (In Prayer) - كتاب السهو
21) Chapter: What a person should do if he stands up after two rak'ahs and forgets to say the tashahh
It was narrated from 'Abdullah bin Buhainah that:
The Messenger of Allah (ﷺ) stood up during the prayer when he should have sat, so he prostrated twice while sitting, before the taslim.
21) باب مَا يَفْعَلُ مَنْ قَامَ مِنَ اثْنَتَيْنِ نَاسِيًا وَلَمْ يَتَشَهَّدْ
أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا اللَّيْثُ، عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ هُرْمُزَ، عَنْ عَبْدِ اللَّهِ ابْنِ بُحَيْنَةَ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّهُ قَامَ فِي الصَّلاَةِ وَعَلَيْهِ جُلُوسٌ فَسَجَدَ سَجْدَتَيْنِ وَهُوَ جَالِسٌ قَبْلَ التَّسْلِيمِ .