1: a means of escape
especially : an ambiguity or omission in the text through which the intent of a statute, contract, or obligation may be evaded
2a: a small opening through which small arms may be fired
b: a similar opening to admit light and air or to permit observation
She took advantage of a loophole in the tax law.
His attorney has been hunting for a loophole that would allow him to get out of the deal.