give someone a taste/dose of their own medicine - definition and synonyms

phrase
  1. to treat someone in the same bad way that they have treated someone else

    It’s time those cheats got a taste of their own medicine.

See also main entry: medicine