The Messenger of Allah ﷺ said, "Aslam, may Allah grant them peace, and Ghifar, may Allah forgive them. By Allah, I did not say this myself, but Allah said it."
أن رسول الله ﷺ قال: أسلم سالمها الله، وغفار غفر الله لها، أما والله ما أنا قلته ولكن الله قاله.
Ahmad narrated it (16517), and in Fadail al-Sahabah (1683), from Abdul-Samad (that is, Ibn Warith), who said, Umar bin Rashid Yamami narrated to us, who said, Iyas bin Salama bin Akwa narrated to us, from his father, who said, and then he related it. Umar bin Rashid Yamami is daif, though he is acceptable for corroboration, and he has indeed been corroborated.Hakim narrated it (4/82) from Husayn bin Hasan bin Ayub, who said, Abdullah bin Ahmad bin Abu Musarrah narrated to us, who said, Abdullah bin Zubayr Humaydi narrated to us, who said, Ali bin Yazid bin Abu Hakeemah Aslami narrated to us, who said, Iyas bin Salama bin Akwa narrated to me, from his father , that the Prophet ﷺ used to stand in prayer and invoke curses on tribes among the Arabs, saying, "May Allah curse Ril, Zakwan, and Usayyah, who disobeyed Allah and His Messenger, and Banu Lihyan." And he would say, "As for Ghifar, may Allah forgive them, and as for Aslam, may Allah grant them safety. I am not the one who said it, rather Allah
said it." Then he would say the takbir after invoking curses on those he cursed.Ali bin Yazid bin Abu Hakeemah is majhul (unknown), and no one has affirmed his reliability except Ibn Hibban, as is his custom in affirming unknown narrators. Abdullah bin Abu Musarrah is truthful (saduq), and the rest of the narrators are reliable narrators. Hakim said, "The isnad is sahih." The hadith, by way of these two chains, rises to the level of hasan, Allah willing.