poisoned chalice

Advanced (C1) formal

An opportunity that seems good but actually causes you trouble.

"The newly appointed minister quickly realised the portfolio was a poisoned chalice."