A common expression is a double-edged sword:
something that has or can have both favorable and unfavorable consequences
Here is an example of it in use, showing the subject's positive and negative effects, from an article titled, Technology is a double-edged sword:
...innovation is a double-edged sword. Digital technology is indeed creative, in the sense that it enables us to do new things that were hitherto impossible....But technology is also destructive in the sense that it destroys or undermines things that are valuable: bookshops and print newspapers...
Alternate versions of the same concept are "two-edged sword" and "it cuts both ways".
So we could reword the above example as either:
... innovation is a two-edged sword.
... innovation cuts both ways.