Muaz bin Jabal reported,

things the companions of the Messenger of Allah ﷺ had not heard, and remained silent about what they had heard. When Abdullah bin Umar was told what Muaz was saying, he said, "By Allah, I never heard the Messenger of Allah ﷺ say this. Muaz is about to lead you astray concerning the matter of relieving oneself."This reached Muaz, so he met with him and said, "Abdullah bin Umar, denying a hadith from the Messenger of Allah ﷺ is hypocrisy. The sin of it falls only upon the one who said it. I indeed heard the Messenger of Allah ﷺ say, 'Beware of the three acts that bring curses, relieving oneself at watering places, in the shade, and on the path people travel.'"

Ibn Majah 328

Daif

حدثنا حرملة بن يحيى حدثنا عبد الله بن وهب أخبرني نافع بن يزيد عن حيوة بن شريح أن أبا سعيد الحميري حدثه قال كان

معاذ بن جبل يتحدث

بما لم يسمع أصحاب رسول الله ﷺ ويسكت عما سمعوا فبلغ عبد الله بن عمرو ما يتحدث به فقال والله ما سمعت رسول الله ﷺ يقول هذا وأوشك معاذ أن يفتنكم في الخلاء فبلغ ذلك معاذا فلقيه فقال معاذ يا عبد الله بن عمرو إن التكذيب بحديث عن رسول الله ﷺ نفاق وإنما إثمه على من قاله لقد سمعت رسول الله ﷺ يقول اتقوا الملاعن الثلاث البراز في الموارد والظل وقارعة الطريق

ابن ماجه 328ضعيف
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Purification and its sunnahs
Chapter
Prohibition of relieving oneself on the roadside
Numbering
Darussalam 328
Ibn Majah 328