A prenominal (attributive) expression meaning ill-natured, nasty, or troublesome in character or quality; used before nouns to modify them.
たちの悪い仲間に巻き込まれてしまった。
I got mixed up with some nasty companions.
たちの悪いシミが服について落ちない。
A stubborn stain has gotten on the clothes and won't come out.
たちの悪い冗談を言う上司は困る。
A boss who makes nasty jokes is a problem.