Harith bin Khafaf reported,

Khafaf bin Ima said, "The Messenger of Allah ﷺ performed the bowing in prayer, then raised his head and said, 'Ghifar, may Allah forgive them. Aslam, may Allah grant them peace. Usayyah has disobeyed Allah and His Messenger. O Allah, curse Banu Lahyan, and curse Ril and Zakwan.' Then he fell into prostration."Khafaf said, "From that time, cursing the disbelievers became established."

Muslim 1558

Sahih

و حدثنا يحيى بن أيوب وقتيبة وابن حجر قال ابن أيوب حدثنا إسمعيل قال أخبرني محمد وهو ابن عمرو عن خالد بن عبد الله بن حرملة

عن الحارث بن خفاف أنه قال

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

مسلم 1558صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Mosques and places of prayer
Chapter
Recommendation of qunut in all prayers when a calamity befalls the Muslims
Numbering
Darussalam 1558
Muslim 1558