Abu Hurayrah, who said: The Messenger of Allah (peace and blessings be upon him) said it. Ahmad (2/367), Ibn Abi Shaybah in al-Musannaf (12/18/2), al-Qudaʿi (14/1), and al-Khatib in his Tarikh (2/271–272) also narrated it through other chains from Abu Maʿshar, with this chain of transmission.
I say: This chain contains weakness because Abu Maʿshar had a poor memory. Perhaps both al-Hafiz, who said in al-Fath (3/281), “Its chain is good,” and his teacher al-Haythami, who said likewise in al-Majmaʿ (10/151), meant that it is strengthened by corroboration. Otherwise, al-Hafiz himself had decisively declared Abu Maʿshar weak in al-Taqrib.
It has a corroborating report from the hadith of Abu ʿAbd al-Ghaffar, ʿAbd al-Rahman ibn ʿIsa—a Basran—whose son identified him by name in Egypt in the transmission of Ibn ʿUfayr. He said: I heard Anas ibn Malik say, attributing it to the Prophet: “Beware of the supplication of the oppressed, even if he is a disbeliever, for there is no barrier between it and Allah.” Ibn Maʿin narrated it in al-Tarikh (10/157/1); al-Dulabi narrated it from him in al-Kuna (2/73), as did al-Qudaʿi in Musnad al-Shihab (f. 81/2).
I say: Its narrators are trustworthy except for this Abu ʿAbd al-Ghaffar, who is unknown, as stated in the sections on kunyahs in al-Mizan and al-Lisan; neither of them names him at all. Take this as a useful point: he is ʿAbd al-Rahman ibn ʿIsa. Abu Hatim had preceded them both in this, as recorded in his son’s book (4/2/406). In the section on names (2/2/272), he said: “ʿAbd al-Rahman ibn ʿIsa narrated from al-Zuhri. Saʿid ibn Abi Ayyub narrated from ʿImran ibn Sulaym from him. I asked my father about him, and he replied: ‘Unknown.’”