CVE-2026-48487: zeroconf Unvalidated Rdlength Vulnerability

MODERATE
Advisory Identifier: GHSA-qc2x-6f54-m6h9
CVSS 6.5
CWE-130
Published
Advisory Summary

CVE-2026-48487 is a MODERATE (CVSS 6.5) unvalidated rdlength vulnerability (CWE-130: Improper Handling of Length Parameter Inconsistency) affecting zeroconf libraries in the PyPI ecosystem. The issue involves unvalidated rdlength in record payload readers allows lan-local cache corruption via crafted mdns packet. Remediation is available by upgrading affected packages to version 0.149.16.

CVE-2026-48487 at a Glance

CVE Identifier CVE-2026-48487
GHSA Identifier GHSA-qc2x-6f54-m6h9
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-130: Improper Handling of Length Parameter Inconsistency
Affected Product zeroconf
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Adjacent (AV:A)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-48487

To remediate this vulnerability, upgrade all affected zeroconf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

zeroconf fixed: 0.149.16
pip install zeroconf>=0.149.16
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show zeroconf

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-48487, inspect your installed packages using pip:

pip show zeroconf

Analyze the terminal output to locate any version of zeroconf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.149.16), your application is affected.

Note: The pip show zeroconf command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-130: Improper Handling of Length Parameter Inconsistency, where the product parses a formatted message or structure, but it does not handle or incorrectly handles a length field that is inconsistent with the actual length of the associated data. In zeroconf, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact `_read_character_string` and `_read_string` in `src/zeroconf/_protocol/incoming.py` sliced `self.data[self.offset : self.offset + length]` and advanced `self.offset` by the declared `length` without checking it against `self._data_len`. Python's slice silently returns fewer bytes when the end index runs past the buffer, so a record whose 16-bit RDLENGTH (RFC 1035 §3.2.1) over-advertised by tens of kilobytes was constructed from a truncated payload, appended to `DNSIncoming._answers`, and committed to the cache before any later parse failure surfaced. The follow-up `_read_name` for the next record then failed, but the corrupt record had already entered the answer list and propagated to `DNSCache` and `ServiceInfo`. Any unauthenticated host on the local link (UDP/5353, `224.0.0.251` / `ff02::fb`) can multicast a single mDNS response carrying a TXT, HINFO, or A/AAAA record that advertises rdlength=65535 and only a handful of real payload bytes; consumers calling `ServiceInfo.properties` then parse the truncated bytes as if they matched the wire, and downstream integrations (Home Assistant and other zeroconf-driven discovery) trust the decoded record. The bug is parser-state desync rather than RCE, but it seeds the cache with attacker-shaped key/value and address records for a TTL window and is a building block for higher-impact chains. The impact is likely lower than the other recently released advisories as there is no additional risk of OOM so the severity was manually set to low to override the score CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N (6.5, Medium) since that doesn't fully consider the mDNS threat model. ### Patches Fixed in `zeroconf` 0.149.16 ([PR #1756](https://github.com/python-zeroconf/python-zeroconf/pull/1756)). Note that this change originally intended to ship in 0.149.13 but we ran out of space on PyPI: see https://github.com/python-zeroconf/python-zeroconf/issues/1769 Upgrade to `>= 0.149.16`. ### 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 #1756](https://github.com/python-zeroconf/python-zeroconf/pull/1756), fix - [Issue #1752](https://github.com/python-zeroconf/python-zeroconf/issues/1752), public tracking issue - [RFC 1035 §3.2.1](https://www.rfc-editor.org/rfc/rfc1035#section-3.2.1), [RFC 1035 §3.3](https://www.rfc-editor.org/rfc/rfc1035#section-3.3), [CWE-130](https://cwe.mitre.org/data/definitions/130.html)

CVE-2026-48487 Affected zeroconf Versions

1 component(s)
Fixed Versions:
0.149.16
Product / Package Ecosystem Affected Versions Fixed Version
zeroconf
PyPI
< 0.149.16
0.149.16

References

Frequently Asked Questions

What is CVE-2026-48487?
CVE-2026-48487 is a security vulnerability in zeroconf involving Unvalidated rdlength in record payload readers allows LAN-local cache corruption via crafted mDNS packet under CWE-130: Improper Handling of Length Parameter Inconsistency.
Which zeroconf versions are affected?
Affected versions include releases prior to 0.149.16 across affected packages: zeroconf.
What version fixes CVE-2026-48487?
Upgrading to 0.149.16 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zeroconf affected?
Yes, zeroconf is affected in releases prior to 0.149.16. Upgrade your dependency to 0.149.16 or later.
What is the CVSS score of CVE-2026-48487?
CVE-2026-48487 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2026-48487?
CVE-2026-48487 is classified under CWE-130: Improper Handling of Length Parameter Inconsistency (The product parses a formatted message or structure, but it does not handle or incorrectly handles a length field that is inconsistent with the actual length of the associated data.).
How can I check PyPI dependencies for CVE-2026-48487?
Run the dependency tree command: 'pip show zeroconf'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qc2x-6f54-m6h9",
  "modified" : "2026-06-22T23:07:44Z",
  "published" : "2026-06-22T23:07:44Z",
  "aliases" : [ "CVE-2026-48487" ],
  "summary" : "zeroconf: Unvalidated rdlength in record payload readers allows LAN-local cache corruption via crafted mDNS packet",
  "details" : "### Impact\n\n`_read_character_string` and `_read_string` in `src/zeroconf/_protocol/incoming.py` sliced `self.data[self.offset : self.offset + length]` and advanced `self.offset` by the declared `length` without checking it against `self._data_len`. Python's slice silently returns fewer bytes when the end index runs past the buffer, so a record whose 16-bit RDLENGTH (RFC 1035 §3.2.1) over-advertised by tens of kilobytes was constructed from a truncated payload, appended to `DNSIncoming._answers`, and committed to the cache before any later parse failure surfaced. The follow-up `_read_name` for the next record then failed, but the corrupt record had already entered the answer list and propagated to `DNSCache` and `ServiceInfo`.\n\nAny unauthenticated host on the local link (UDP/5353, `224.0.0.251` / `ff02::fb`) can multicast a single mDNS response carrying a TXT, HINFO, or A/AAAA record that advertises rdlength=65535 and only a handful of real payload bytes; consumers calling `ServiceInfo.properties` then parse the truncated bytes as if they matched the wire, and downstream integrations (Home Assistant and other zeroconf-driven discovery) trust the decoded record. The bug is parser-state desync rather than RCE, but it seeds the cache with attacker-shaped key/value and address records for a TTL window and is a building block for higher-impact chains.\n\nThe impact is likely lower than the other recently released advisories as there is no additional risk of OOM so the severity was manually set to low to override the score CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N (6.5, Medium) since that doesn't fully consider the mDNS threat model.\n\n### Patches\n\nFixed in `zeroconf` 0.149.16 ([PR #1756](https://github.com/python-zeroconf/python-zeroconf/pull/1756)).  Note that this change originally intended to ship in 0.149.13 but we ran out of space on PyPI: see https://github.com/python-zeroconf/python-zeroconf/issues/1769\n\nUpgrade to `>= 0.149.16`.\n\n### Workarounds\n\nThere 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.\n\n### Resources\n\n- [PR #1756](https://github.com/python-zeroconf/python-zeroconf/pull/1756), fix\n- [Issue #1752](https://github.com/python-zeroconf/python-zeroconf/issues/1752), public tracking issue\n- [RFC 1035 §3.2.1](https://www.rfc-editor.org/rfc/rfc1035#section-3.2.1), [RFC 1035 §3.3](https://www.rfc-editor.org/rfc/rfc1035#section-3.3), [CWE-130](https://cwe.mitre.org/data/definitions/130.html)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "zeroconf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.149.16"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/python-zeroconf/python-zeroconf/security/advisories/GHSA-qc2x-6f54-m6h9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python-zeroconf/python-zeroconf/issues/1752"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python-zeroconf/python-zeroconf/pull/1756"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/python-zeroconf/python-zeroconf"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-130" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-22T23:07:44Z",
    "nvd_published_at" : null
  }
}