be hoist by own petard

be hoist by/with your own petard

  (formal)
if you are hoist by your own petard, something that you did in order to bring you advantages or to harm someone else is now causing serious problems for you The government, who have made such a point of criticizing the opposition's morals now find themselves hoist by their own petard as yet another minister is revealed as having an illicit affair.
See also: hoist, petard