When a rodent problem crosses into a legal violation
Yes. A rat or mouse infestation can be a habitability violation in California when the landlord fails to address it. State law specifically requires rentals to be kept free of rodents.
California's habitability standard (Civil Code Section 1941.1) lists a building being "free from... rodents, and vermin" as part of what makes a home livable — so rats and mice are named directly. A single mouse may not be a legal violation, but a real, ongoing infestation the landlord was told about and did not properly handle can breach the implied warranty of habitability, the automatic promise that your home will be fit to live in.
Rodents usually enter through gaps in the building, which the landlord is responsible for sealing, and they multiply quickly once inside. If rats or mice have infested your unit and your landlord will not fix it, a free, confidential review can explain your options.
This is general information about California tenant rights, not legal advice. Every situation is different.