It wasnarrated that Abu Hurairah said:
"A scorpion stung a man andhe didnot sleep all the night. It was said to the Prophet (ﷺ): 'So-and-sowas stung by a scorpion and he did not sleep all the night.' Hesaid: 'If he had said, last night: A'udhubikalimatil-lahit-tammatimin sharri ma khalaq (I seek refuge in thePerfect Words of Allah fromthe evil of that which He has created),the scorpion sting would nothave harmed him, until morning.'"
English reference: Vol. 4, Book 31, Hadith 3518
Arabic reference: Book 31, Hadith 3647