The Messenger of Allah ﷺ said, "Beware of the three things that bring curses, relieving yourself near water sources, in the middle of the path, or in the shade."
حدثنا إسحق بن سويد الرملي وعمر بن الخطاب أبو حفص وحديثه أتم أن سعيد بن الحكم حدثهم قال أخبرنا نافع بن يزيد حدثني حيوة بن شريح أن أبا سعيد الحميري حدثه
قال رسول الله ﷺ اتقوا الملاعن الثلاثة البراز في الموارد وقارعة الطريق والظل
[Its isnad is daif]. Ibn Majah reported it in the Book of Purification, Chapter on the prohibition of relieving oneself on the roadside, hadith 328, from Nafi bin Yazid, by this route. Hakim graded it sahih at 1/167, and Dhahabi agreed with him, but Busiri graded it daif due to the defect of disconnection, since Abu Saeed Hijri did not meet Muaz bin Jabal . The hadith has a daif corroborating narration in Ahmad at 1/299, and the hadith of Muslim, hadith 269, serves in its place.