This Dua is mentioned in Hadees Shareef of Sahih Muslim (2708 Arabic Version & Book 35 Hadith 6542 English Version) :
Khaula bint Hakim Sulamiyya reported: I heard Allah’s Messenger (peace be upon him) as
saying: When any one of you stays at a place, he should say: “I seek refuge in the Perfect Word of
Allah from the evil of that He created.” Nothing would then do him any harm until he moves from that
Abu Huraira reported that a person came to Allah’s Messenger (may peace be upon him) and
said: “Allah’s Messenger, I was stung by a SCORPION during the night. Thereupon he said: Had you
recited these words in the evening: “I seek refuge in the Perfect Word of Allah from the evil of what
He created,” it would not have done any harm to you.