A scorpion stung a man, and he could not sleep all night. The Prophet ﷺ was told, "So-and-so was stung by a scorpion and could not sleep all night."He said, "If only he had said when evening came, 'I seek refuge in the perfect words of Allah from the evil of what He has created,' no scorpion sting would have harmed him until morning."
حدثنا إسمعيل بن بهرام حدثنا عبيد الله الأشجعي عن سفيان عن سهيل بن أبي صالح عن أبيه
لدغت عقرب رجلا فلم ينم ليلته فقيل للنبي ﷺ إن فلانا لدغته عقرب فلم ينم ليلته فقال أما إنه لو قال حين أمسى أعوذ بكلمات الله التامات من شر ما خلق ما ضره لدغ عقرب حتى يصبح
Sourcing, [sahih] Nasai reported it in Kubra, 6/153, no. 10428, from the hadith of Ashjai, through this route, and Busiri graded it sahih.Sufyan Thawri was followed by Hammad bin Zayd, Malik, and others, also with Nasai (no. 10424, 10425). It also has a corroborating witness in Sahih Muslim, Remembrance and Supplication, chapter on seeking refuge from an evil decree, etc., no. 2709/55.