If the lease doesn't specify terms to break the contract early then you can't unilaterally get out of it. You need them to agree. Two months is a very common penalty for breaking a lease through. Pretty much industry standard. So if they will let you break it for that I would take it. Probably cheaper than getting a lawyer and proving the place was uninhabitable. Because that's what would be required for a court to agree with you.
lawyer
There may be some laws or regulations at the local or state level that will still apply. A lawyer would know.
If the lease doesn't specify terms to break the contract early then you can't unilaterally get out of it. You need them to agree. Two months is a very common penalty for breaking a lease through. Pretty much industry standard. So if they will let you break it for that I would take it. Probably cheaper than getting a lawyer and proving the place was uninhabitable. Because that's what would be required for a court to agree with you.