Al-Ṭabarānī recorded it (3/81/1).
I say: This chain is very weak. Layth is weak, and ʿAbbād ibn Kathīr is abandoned.
A similar report was narrated from Ibn ʿAbbās with the wording:
“...or one who kills either of his parents; the image-makers; and a scholar who does not benefit from his knowledge.”
Abū al-Qāsim al-Hamadhānī recorded it in al-Fawāʾid (1/196/1), from ʿAbd al-Raḥīm Abū al-Haytham, from al-Aʿmash, from al-Shaʿbī, from Ibn ʿAbbās, with this wording.
I say: This chain is weak. This ʿAbd al-Raḥīm is Ibn Ḥammād al-Thaqafī. Al-ʿUqaylī said in al-Ḍuʿafāʾ (278):
“He narrated from al-Aʿmash objectionable reports, as well as reports attributed to al-Aʿmash that have no basis.”
The hadith master said in Lisān al-Mīzān:
“Al-Bayhaqī indicated in al-Shuʿab that he was weak.”
Al-Manāwī cited this hadith of Ibn ʿAbbās in Fayḍ al-Qadīr as supporting evidence for the well-known hadith: “The people most severely punished on the Day of Resurrection will be a scholar who did not benefit from his knowledge.” Then, after pointing out its weakness, he said in criticism of al-Suyūṭī:
“Yet the hadith has a well-established basis, for al-Ḥākim narrated in al-Mustadrak, from the hadith of Ibn ʿAbbās attributed to the Prophet...”
I say: He then cited it, but I have not presently found its chain in al-Ḥākim’s work in order to examine it. Most likely, it is through the route of the aforementioned ʿAbd al-Raḥīm. If that is so, the hadith cannot thereby be raised beyond the level of weakness. And Allah knows best.