Something dangerous that you can't go without?

Solution 1:

I don't want to use it, but the necessary evil might be our only/best option.

(Cambridge definition)

Solution 2:

If you're happy with a two word description. A "calculated risk" or even a "necessary risk" would be options.

Solution 3:

There might be nothing that matches this exact meaning. But the closest I can think of is a double-edged sword.

From the notion that if two sides of the same blade are sharp, it cuts both ways.

(idiomatic) A benefit that is also a liability, or (a benefit) that carries some significant but not-so-obvious cost or risk.

(Wiktionary)