double edged sword
An example of a double edged sword is an excuse that you were intoxicated when you behaved badly. You could end being forgiven for your behavior because you weren't really in control of your actions or you could end up being in more trouble for being intoxicated.
(plural double-edged swords)
From the notion that if two sides of the same blade are sharp, it cuts both ways. The metaphor may have originated in Arabic, in the expression سيف ذو حدين (sayf zou hadayn, “double-edged sword”). The metaphor is first attested in English in the 15th century. It is not to be confused with a double-ended sword.