Sunan Abu Dawud #29
Purification (Kitab Al-Taharah) 1: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.