It is narrated from Imam Amir al-Sha'bi (may Allah have mercy on him) that he said: "The Messenger of Allah (peace and blessings be upon him) cursed al-Hakam (bin Abi al-As) and those who would come from his loins, that is, his offspring."
This narration is mursal, because Imam al-Sha'bi (may Allah have mercy on him) is a Successor (tabi'i) and he narrated it directly from the Prophet (peace and blessings be upon him). Moreover, its chain contains a narrator named Mujalid bin Sa'id, who according to the hadith scholars is da'if (weak) and makes many mistakes.
Hadith Referenceالمطالب العالية بزوائد المسانيد الثمانية / كتاب الفتوح / 4459
Hadith Gradingمحدثین:إسناده ضعيف، مرسل
Hadith Takhrij«حکم الحدیث المطالب العالیہ محققاً تنسیق د. سعد بن ناصر بن عبد العزيز الشَّثري- مکتبہ شاملہ :إسناده ضعيف مرسل » «أخرجه المستدرك على الصحيحين برقم: 8531، وأخرجه مجمع الزوائد ومنبع الفوائد برقم: 9240، 9241، وأخرجه إتحاف الخيرة المهرة بزوائد المسانيد العشرة برقم: 5309، 7527/1»