Sunan Ibn Majah 1213
سنن ابن ماجه#1213SahihIt was narrated from Ibn ‘Umar that the Messenger of Allah (ﷺ) forgot and said the Taslim after two Rak’ah. A man who was called Dhul-Yadain said to him:‘O Messenger of Allah, has the prayer been shortened or did you forget?’ He said: ‘It has not been shortened and I did not forget.’ He said: ‘But you prayed two Rak’ah.’ He said: ‘Is what Dhul-Yadain says true?’ They said: ‘Yes.’ So he went forward and performed two Rak’ah and said the Salam, then he prostrated twice for prostrations of forgetfulness
Scholarly Authentication
We show the most cautious grade (weakest-wins) as the overall label. Individual scholars graded it as follows:
Al-AlbaniSahih
Muhammad Fouad Abd al-BaqiSahih
Shuaib Al ArnautSahih
Zubair Ali ZaiIsnaad Sahih
In-book reference: 5:411