Abu Hurairah reported,

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."

Ibn Majah 3518

Sahih

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

عن أبي هريرة قال

لدغت عقرب رجلا فلم ينم ليلته فقيل للنبي ﷺ إن فلانا لدغته عقرب فلم ينم ليلته فقال أما إنه لو قال حين أمسى أعوذ بكلمات الله التامات من شر ما خلق ما ضره لدغ عقرب حتى يصبح

ابن ماجه 3518صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Medicine
Chapter
Ruqyah for snakes and scorpions
Numbering
Darussalam 3518
Ibn Majah 3518