The phrase “between a rock and hard place” sometimes is used to describe situations where the various available alternatives each have drawbacks.
For more discussion and background on “Out of the frying pan, into the fire”, see Callithumpian's answer to Are there any expressions that describe going from a bad to a worse situation?.
The term double-edged sword (“something that has or can have both favorable and unfavorable consequences [eg] ”) is sometimes used to say that a given solution can have unintended negative consequences. According to wiktionary,
Etymology
From the notion that two sides of the same blade are sharp — it cuts both ways. Its origin is from the same Arabic expression سيف ذو حدين (sayf zou hadayn, “double-edged sword”). The term is first attested in the 15th century. It is not to be confused with a double-ended sword.
Noun
... (idiomatic) A benefit that is also a liability, or that carries some significant but non-obvious cost or risk.