A security deposit is not the same thing as rent. A security deposit is a way for a landlord to ensure that they can repair any damage made to the property.
Section 92.108 of the Texas Property Code prohibits a tenant from using their security deposit for last month’s rent. If a tenant violates this law, they may be liable for three times the amount of money withheld plus attorney’s fees.
One exception is if a tenant ends the lease early due to a landlord’s failure to repair a condition that could affect the tenant’s health or safety (see Sec. 92.056 of the Property Code). In this case, the tenant may deduct the amount of their security deposit from the rent that they owe. They may also ask for a refund of their security deposit.
For more information, you may want to review the Texas Tenant Advisor’s article on security deposits.
Disclaimer: The State Law Library cannot tell you what a law means for your situation. Please contact an attorney for help determining what the law means for you. If you have questions or need help finding resources, please ask a librarian.