Are you asking if you can leave ?
Yes, I understand.
To be wholly honest, if this is an AST then it is quite unlikely you could escape consequence free on that basis. You could try to argue there were health considerations but probably they would fail.
The only health consideration that allows release is where there is literally an immediate risk to your health.
But it is simple enough to get this resolved. Just make a report to Environmental Health. It doesn't matter whether this is private renting or not. They will be interested in this. They will just issue an improvement notice.
Can I clarify anything for you?
If you leave unlawfully then they will be under a duty to mitigate their loss by seeking a new tenant.
But you will be liable for rent in the meantime.
Although you would have a claim for disrepair given the condition of the property.
Yes, and they may well not have the pure audacity to sue you in the circumstances.
All the best.
Please remember to rate my answer.