Whenever Messenger of Allah ﷺ intended to invoke evil upon somebody or invoke good upon somebody, he used to invoke (Allah after bowing (in the prayer). Sometimes after saying, "Allah hears him who sends his praises to Him, all praise is for You, O our Lord," he would say, "O Allah. Save Al-Walid bin Al-Walid and Salama bin Hisham, and ʿAiyash bin Abu Rabiʿa. O Allah! Inflict Your Severe Torture on Mudar (tribe) and strike them with (famine) years like the years of Joseph." The Prophet ﷺ used to say in a loud voice, and he also used to say in some of his Fajr prayers, "O Allah! Curse soand- so and so-and-so." naming some of the Arab tribes till Allah revealed:--"Not for you (O Muhammad) (but for Allah) is the decision." (3.128) (Using translation from Bukhārī 4560)
كَانَ رَسُولُ اللهِ ﷺ إِذَا أَرَادَ أَنْ يَدْعُوَ عَلَى أَحَدٍ أَوْ يَدْعُوَ لِأَحَدٍ يَقْنُتُ بَعْدَ الرُّكُوعِ فَرُبَّمَا قَالَ إِذَا قَالَ سَمِعَ اللهُ لِمَنْ حَمِدَهُ رَبَّنَا وَلَكَ الْحَمْدُ اللهُمَّ أَنْجِ الْوَلِيدَ بْنَ الْوَلِيدِ وَسَلَمَةَ بْنَ هِشَامٍ وَالْمُسْتَضْعَفِينَ مِنَ الْمُؤْمِنِينَ اللهُمَّ اشْدُدْ وَطْأَتَكَ عَلَى مُضَرَ وَاجْعَلْهَا عَلَيْهِمْ سِنِينَ كَسِنِي يُوسُفَ يَجْهَرُ بِذَلِكَ قَالَ وَكَانَ يَقُولُ فِي بَعْضِ صَلَوَاتِهِ فِي صَلَاةِ الْفَجْرِ اللهُمَّ الْعَنْ فُلَانًا وَفُلَانًا لَأَحْيَاءٍ مِنَ الْعَرَبِ حَتَّى أَنْزَلَ اللهُ تَعَالَى {لَيْسَ لَكَ مِنَ الْأَمْرِ شَيْءٌ أَوْ يَتُوبَ عَلَيْهِمْ أَوْ يُعَذِّبَهُمْ فَإِنَّهُمْ ظَالِمُونَ} [آل عمران 128]