Fiqh-us-Sunnah Volume 1, Purification and Prayer, Fiqh 1.018B.
Section : One should not use a hole in the ground.
Qatadah related from ‘Abdullah ibn Sarjas who said, “The Messenger of Allah forbade urination into a hole.” Said Qatadah, “What is disliked about urinating into a hole?” Said he, “It is the residence of the jinn.”
This hadith is related by Ahmad, an-Nasa’i, Abu Dawud, al-Hakim and al-Baihaqi. Ibn Khuzaimah and Ibn as-Sakin classified it as sahih.