Sahih al-Bukhari 6322
Book 80: Invocations · Narrated by Anas bin Malik
Arabic
حَدَّثَنَا مُحَمَّدُ بْنُ عَرْعَرَةَ، حَدَّثَنَا شُعْبَةُ، عَنْ عَبْدِ الْعَزِيزِ بْنِ صُهَيْبٍ، عَنْ أَنَسِ بْنِ مَالِكٍ ـ رضى الله عنه ـ قَالَ كَانَ النَّبِيُّ صلى الله عليه وسلم إِذَا دَخَلَ الْخَلاَءَ قَالَ " اللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنَ الْخُبُثِ وَالْخَبَائِثِ ".
English translation
Narrated Anas bin Malik:Whenever the Prophet (ﷺ) went to the lavatory, he used to say: "Allahumma inni a`udhu bika min al-khubuthi wal khaba'ith
Reference: Sahih al-Bukhari 6322, Book of Invocations. English translation by Dr. Muhammad Muhsin Khan.