Hadith on Prayer: Two prostrations when you forget in prayer

Abu Huraira reported: The Messenger of Allah, peace and blessings be upon him, said, “Verily, if one of you stands for prayer, Satan comes to distract him until he does not know how many cycles he has performed. When that happens to one of you, then let him perform two prostrations while he is sitting.”

Source: Ṣaḥīḥ al-Bukhārī 1175, Ṣaḥīḥ Muslim 389

Grade: Muttafaqun Alayhi (authenticity agreed upon) according to Al-Bukhari and Muslim

عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ إِنَّ أَحَدَكُمْ إِذَا قَامَ يُصَلِّي جَاءَ الشَّيْطَانُ فَلَبَسَ عَلَيْهِ حَتَّى لَا يَدْرِيَ كَمْ صَلَّى فَإِذَا وَجَدَ ذَلِكَ أَحَدُكُمْ فَلْيَسْجُدْ سَجْدَتَيْنِ وَهُوَ جَالِسٌ

1175 صحيح البخاري كتاب السهو باب السهو في الفرض والتطوع

389 صحيح مسلم كتاب المساجد ومواضع الصلاة باب السهو في الصلاة والسجود له