It is narrated from Imam al-Sha'bi: "The Messenger of Allah (peace and blessings be upon him) cursed al-Hakam and those born from his loins." It is also narrated from Sayyiduna Abdullah bin al-Zubayr (may Allah be pleased with them both) that, leaning against the Ka'bah, he said: "By the Lord of this Ka'bah! The Messenger of Allah (peace and blessings be upon him) cursed so-and-so and the offspring born from his loins."
Imam Ishaq recorded this narration as mursal, and its narrators are thiqat (trustworthy), while Imam Ahmad bin Hanbal recorded it as marfu'.