Abdullah bin Masud reported,

While we were with the Prophet ﷺ in a cave, the surah al-Mursalat was revealed to him. He began reciting it, and I was receiving it directly from his mouth, his mouth still moist with its words, when suddenly a snake leapt out at us.The Prophet ﷺ said, "Kill it!"We rushed at it, but it escaped.The Prophet ﷺ then said, "It has been spared your harm just as you have been spared its harm."Umar said, "I memorized this from Ubayy in a cave at Mina."

Bukhari 4934

Sahih

حدثنا عمر بن حفص بن غياث حدثنا أبي حدثنا الأعمش حدثني إبراهيم عن الأسود

عن عبد الله قال

بينما نحن مع النبي ﷺ في غار إذ نزلت عليه والمرسلات فإنه ليتلوها وإني لأتلقاها من فيه وإن فاه لرطب بها إذ وثبت علينا حية فقال النبي ﷺ اقتلوها فابتدرناها فذهبت فقال النبي ﷺ وقيت شركم كما وقيتم شرها قال عمر حفظته من أبي في غار بمنى

البخاري 4934صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tafsir
Chapter
His saying, "This is a day they will not speak"
Numbering
Darussalam 4934
Bukhari 4934