كتاب الطهارة
3  
Purification
(3b)
Chapter: How to act when relieving oneself - Section 2
(2)
باب آداب الخلاء - الفصل الثاني
Mishkat al-Masabih 357
Zaid b. Arqam reported God's messenger as saying, "These privies are peopled by jinn and devils, so when one of you goes there he should say, ‘I seek refuge in God from male and female devils.” Abu Dawud and Ibn Majah transmitted it.
وَعَنْ زَيْدِ بْنِ أَرْقَمَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: " إِنَّ هَذِهِ الْحُشُوشَ مُحْتَضَرَةٌ فَإِذَا أَتَى أَحَدُكُمُ الْخَلَاءَ فَلْيَقُلْ: أَعُوذُ بِاللَّهِ مِنَ الْخُبْثِ والخبائث ". رَوَاهُ أَبُو دَاوُد وَابْن مَاجَه
  صَحِيح   (الألباني) حكم   :
Reference : Mishkat al-Masabih 357
In-book reference : Book 3, Hadith 69