Sunan Abi Dawud, Book 1, Hadith 29 (Abu Dawud 29)

Narrated Abdullah ibn Sarjis:

The Prophet (ﷺ) prohibited to urinate in a hole. Qatadah (a narrator) was asked about the reason for the disapproval of urinating in a hole. He replied: It is said that these (holes) are the habitats of the jinn.