Abdullah bin Umar reported,

He heard the Prophet ﷺ, when he raised his head from the final rakat of the dawn prayer, say, "Allah, curse so-and-so and so-and-so," invoking against certain men among the hypocrites. Then Allah عز وجل revealed, "Not for you is the decision, whether He turns to them in mercy or punishes them, for indeed they are wrongdoers" [Al Imran 3:128].

Azami 2846

Sahih

عن ابن عمر

سمع النبي ﷺ حين رفع رأسه من صلاة الصبح من الركعة الأخيرة قال: اللهم العن فلانا وفلانا يدعو على أناس من المنافقين. فأنزل الله عز وجل: {ليس لك من الأمر شيء أو يتوب عليهم أو يعذبهم فإنهم ظلمون} [سورة آل عمران: ١٢٨].

الأعظمي 2846صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Witr prayer
Section
Recommendation of qunut in prayers when a calamity befalls the Muslims, and saying it aloud
Numbering
Jami al-Kamil 2846 (2nd edition)
Azami 2846