PyPI: zeroconf
CVE-2026-48487
Safety vulnerability ID: SFTY-20260622-18297
Affected versions of the `zeroconf` package are vulnerable to Improper Input Validation due to unvalidated `rdlength` in record payload readers. The `_read_character_string` and `_read_string` functions in `src/zeroconf/_protocol/incoming.py` slice `self.data[self.offset : self.offset + length]` and advance `self.offset` by the declared `length` without verifying it against `self._data_len`, allowing malformed records to be appended to `DNSIncoming._answers`. An attacker on the local network can exploit this by sending a crafted mDNS packet with an over-advertised `rdlength`, causing the cache to store attacker-controlled records, potentially affecting downstream integrations like Home Assistant.
Overview
zeroconf: Unvalidated rdlength in record payload readers allows LAN-local cache corruption via crafted mDNS packet
Advisory
zeroconf – Improper Handling of Length Parameter Inconsistency
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20260622-18297/CVE-2026-48487
- https://github.com/python-zeroconf/python-zeroconf/security/advisories/GHSA-qc2x-6f54-m6h9
- https://github.com/python-zeroconf/python-zeroconf/issues/1752
- https://github.com/python-zeroconf/python-zeroconf/pull/1756
- https://github.com/advisories/GHSA-qc2x-6f54-m6h9
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
