Jabir bin Abdullah reported,

We marched with the Messenger of Allah ﷺ on the expedition of Batn Buwat, while he was pursuing Majdi bin Amr al-Juhani. The water-camels were taken in turns among us, five, six, or seven men sharing one. When it came the turn of a man from the Ansar to ride his water-camel, he made it kneel and mounted it, then prodded it to rise, but it balked at him for a moment.He said to it, "Move on, may Allah curse you!"The Messenger of Allah ﷺ asked, "Who is this man cursing his camel?"The man replied, "It is I, Messenger of Allah."He said, "Get down from it. Do not travel in our company with one who is cursed. Do not invoke curses upon yourselves, nor upon your children, nor upon your wealth. You may strike upon an hour from Allah in which a gift is asked, and He grants it to you."

Azami 10951

Sahih

عن جابر بن عبد الله قال

سرنا مع رسول الله ﷺ في غزوة بطن بواط، وهو يطلب المجدي بن عمرو الجهني، وكان الناضح يعقبه منا الخمسة والستة والسبعة، فدارت عقبة رجل من الأنصار على ناضح له، فأناخه، فركبه، ثم بعثه فتلدن عليه بعض التلدن، فقال له: شأ، لعنك الله، فقال رسول الله ﷺ: من هذا اللاعن بعيره؟ قال: أنا يا رسول الله قال: انزل عنه، فلا تصحبنا بملعون، لا تدعوا على أنفسكم، ولا تدعوا على أولادكم، ولا تدعوا على أموالكم، لا توافقوا من الله ساعة يسأل فيها عطاء فيستجيب لكم.

الأعظمي 10951صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Rulings on supplication
Section
Prohibition of supplicating against oneself, one's children, and one's wealth
Numbering
Jami al-Kamil 10951 (2nd edition)
Azami 10951