Muhammad bin Sirin narrates: A man said to Sayyiduna Abu Hurayrah (may Allah be pleased with him): You have told us the ruling on everything; soon you will be telling us a ruling about relieving oneself as well. Sayyiduna Abu Hurayrah (may Allah be pleased with him) said: I heard the Prophet (peace and blessings be upon him) say: "Whoever relieves himself on any of the roads of the Muslims, upon him is the curse of Allah Almighty, of the angels, and of all mankind."
Al-Tabarani recorded it in al-Mu'jam al-Awsat; from him (Abu Hurayrah) this hadith is recorded in the "Sahih": "Beware of the things that bring about cursing!" The chain of this report contains a narrator, Muhammad bin Amr al-Ansari, whom Yahya bin Ma'in declared da'if (weak) and Ibn Hibban declared thiqah (trustworthy); the remaining narrators of this report are thiqat (trustworthy).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الطهارة / 1002