zeroconf has unbounded DNS record cache that allows LAN-local memory exhaustion via multicast floodGHSA-rfg2-pjw2-56x2
MEDIUMFix: python-zeroconf/python-zeroconf#1718GHSA-rfg2-pjw2-56x2 is a medium-severity (CVSS 6.5) CWE-770 vulnerability in zeroconf. A fix is available for zeroconf — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-rfg2-pjw2-56x2.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-rfg2-pjw2-56x2 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
zeroconfReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
Impact
DNSCache._async_add inserted every response record into cache, _expirations, _expire_heap, and service_cache with no cap on entry count. The only pre-existing protection was a PTR TTL floor (_DNS_PTR_MIN_TTL = 1125 s, RFC 6762 §10), which actually prolonged attacker-injected records, and a periodic async_expire on _CACHE_CLEANUP_INTERVAL = 10 s that could not keep up with a flood.
Any unauthenticated host on the local link (UDP/5353, 224.0.0.251 / ff02::fb) can multicast valid mDNS responses with unique names (RFC 6762 §11 allows up to 253 bytes each) and watch them accumulate. On memory-constrained deployments (Home Assistant on Raspberry-Pi-class hardware is the canonical victim) sustained traffic OOM-kills the process; under lighter load, every cache lookup and every periodic expiry pass grows linearly slower, starving asyncio and breaking unrelated zeroconf consumers (discovery, registration, ServiceBrowser callbacks). A second variant — re-multicasting cached records with shifting TTLs — grows _expire_heap unbounded between cleanup runs without touching cache or _total_records.
Patches
Fixed in zeroconf 0.149.6 (PR #1718). Upgrade to >= 0.149.6.
Workarounds
There is no in-process workaround; upgrading is the fix. Otherwise, restrict mDNS (UDP/5353) to trusted Layer-2 segments via AP client isolation, guest-network separation, or host firewall rules.
Resources
- PR #1718, fix
- Issue #1715, public tracking issue
- RFC 6762 §10, RFC 6762 §11, CWE-400
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | zeroconf | all versions | 0.149.7pip install --upgrade 'zeroconf==0.149.7' |
Affected Products
zeroconfpaulsmDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for zeroconf, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update zeroconf to 0.149.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-rfg2-pjw2-56x2 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Zeroconf is a pure Python implementation of multicast DNS (mDNS) service discovery. Prior to 0.149.7, every mDNS response record is inserted into the internal cache and expiration structures with no cap, so an attacker can multicast a stream of responses with unique names to exhaust memory and degrade cache…
Upgrade to zeroconf 0.149.7 or later once packaged in the affected Red Hat product. Where upgrading isn't immediately possible, restricting the affected host's exposure to the local network segment (network segmentation or firewalling multicast DNS traffic on UDP/5353) reduces the practical attack surface, since exploitation requires local-link access.Source: Red Hat security advisory for GHSA-rfg2-pjw2-56x2 (CC BY 4.0)
Frequently Asked Questions
Is GHSA-rfg2-pjw2-56x2 in your dependencies?
Find it across PyPI, including transitive dependencies.