Hoisting themselves on their own petard.

Definition: “Hoist with his own petard” is a phrase from a speech in William Shakespeare’s play Hamlet that has become proverbial. The phrase’s meaning is literally that a bomb-maker is blown up (“hoist” off the ground) by his own bomb (a “petard” is a small explosive device), and indicates an ironic reversal, or poetic justice.