Sunan Abi Dawud 6

سنن أبي داود#6Sahih

حَدَّثَنَا عَمْرُو بْنُ مَرْزُوقٍ، أَخْبَرَنَا شُعْبَةُ، عَنْ قَتَادَةَ، عَنِ النَّضْرِ بْنِ أَنَسٍ، عَنْ زَيْدِ بْنِ أَرْقَمَ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ إِنَّ هَذِهِ الْحُشُوشَ مُحْتَضَرَةٌ فَإِذَا أَتَى أَحَدُكُمُ الْخَلاَءَ فَلْيَقُلْ أَعُوذُ بِاللَّهِ مِنَ الْخُبُثِ وَالْخَبَائِثِ ‏"‏ ‏.‏

Narrated Zayd ibn Arqam: The Messenger of Allah (ﷺ) said: These privies are frequented by the jinns and devils. So when anyone amongst you goes there, he should say: "I seek refuge in Allah from male and female devils

Scholarly Authentication

The label above is the grade most of these scholars gave — one dissenting opinion no longer speaks for all of them. If any scholar calls a narration fabricated, that verdict is shown instead, whatever the others say. Each scholar's own wording:

Al-AlbaniSahih
Muhammad Muhyi Al-Din Abdul HamidSahih
Zubair Ali ZaiIsnaad Sahih

In-book reference: 1:6