dnspython CVE-2026-128089: A WKS Bitmap Turns Zone Text into Resource Exhaustion
A source-led analysis of the dnspython WKS parser flaw, the exact attacker-controlled input boundary, patch verification and safe zone-file ingestion.
Approximately 5 min read
The security significance of a DNS parser depends on which bytes an application allows an attacker to supply. A newly disclosed dnspython issue, CVE-2026-128089 (GHSA-vvf4-9x63-8xvv), is a useful example: an out-of-range service number in a WKS record can force inefficient bitmap growth while parsing zone-file text. The published advisory rates the issue High and identifies dnspython versions before 2.9.2 as affected. It does not establish that ordinary DNS lookups or every application importing dnspython are exploitable.
The practical question for operators is therefore narrower than “Do we use DNS?”: Can an untrusted party influence WKS record text passed to dnspython’s zone-text parser?
The trust boundary: zone text is not a normal resolver response
A WKS (Well Known Services) resource record associates an IPv4 address, an IP protocol and a bitmap of service ports. The service identifiers are bounded by the 16-bit port-number space: 0 through 65535. In the vulnerable code path, the parser accepted a larger service number and used it as an offset in the bitmap. The library then extended the bitmap toward that offset inefficiently, consuming excessive CPU and memory.
This is an algorithmic resource-exhaustion bug, not a report of credential theft, remote code execution or a generic DNS packet vulnerability. The maintainer advisory specifically scopes impact to applications parsing zone-file text where an attacker can control both record type and record data. That qualification matters. A service that only resolves hostnames through a fixed resolver API has a different exposure profile from a zone-file editor, DNS migration service, hosting control panel or automation job that imports third-party zone text.
An example of the input shape, using a value just above the allowed maximum, is:
import dns.rdata
dns.rdata.from_text("IN", "WKS", "10.0.0.1 udp 65536")
This illustrates the missing range check. It is not a stress test: the example deliberately avoids enormous offsets or instructions to exhaust memory. Do not test larger adversarial values against a production worker.
Why the upper bound is a security property
A bitmap encodes service membership by bit position. If a parser allocates or extends storage based on an untrusted bit position, the numerical magnitude of that position becomes a resource request. A syntactically small decimal string can therefore request disproportionate work.
Checking the range before extending the bitmap changes the operation from “allocate toward any integer the input can express” to “accept only a value that fits the protocol’s finite service namespace.” A separate file-size cap is not an equivalent fix: a small input can still encode a large integer. Similarly, restricting the number of records does not constrain the maximum offset inside one record.
The general lesson extends beyond DNS. Bitmap indexes, sparse-array indexes, decompression lengths, declared object counts and protocol offsets should be validated against semantic bounds before allocation or iteration. The validation belongs at the trust boundary, not merely in a downstream timeout.
What is affected and what is fixed
The maintainer’s GitHub security advisory identifies dnspython releases before 2.9.2 as affected and 2.9.2 as the fixed release. It references the upstream patch commits and release artifact. This article relies on those upstream materials; it does not claim to have reproduced the CPU or memory impact.
For Python environments, inventory both direct and transitive installations. The package installed in a container, virtual environment or serverless deployment can differ from the version pinned in a repository’s requirements file. Check the actual runtime:
python -m pip show dnspython
python -m pip freeze | grep -i '^dnspython=='
Upgrade to 2.9.2 or later in a tested dependency set, rebuild deployment artifacts, and verify the resolved version inside the running image. A lockfile edit alone is not evidence that a running service has been remediated. Where a dependency upgrade must wait, remove untrusted zone-file import capability or route that parsing through a separately constrained process; these are exposure reductions, not replacements for the fix.
A defensible triage sequence
First, locate the actual parser call. Search for use of dns.zone.from_text, dns.rdata.from_text, and WKS handling in code paths that process imported zones, user uploads or data obtained from other tenants. The presence of dnspython in an SBOM is an inventory signal, not proof of a reachable vulnerability.
Second, trace the input authority. Determine whether the attacker can choose the record type and its textual data. An administrator-only, trusted static zone file has a different threat model from a self-service DNS management portal that accepts zone snippets from arbitrary customers.
Third, constrain blast radius. Zone imports should have size and record-count limits, CPU and memory budgets, per-tenant concurrency limits and isolated workers. Timeouts alone are insufficient if a single parse can allocate memory faster than a supervisor can interrupt it. Keep ingestion workers separate from latency-sensitive API handlers.
Fourth, test the patch safely. Use the published out-of-range boundary value (65536), not huge stress inputs, as a regression case in a disposable environment. Assert that the patched parser rejects invalid service numbers promptly, and separately test that legitimate WKS records still parse. Preserve the package version, test fixture and observed exception in the remediation record.
Fifth, close the evidence gap. Record which deployed images were updated and which endpoints can ingest zone text. A green dependency scanner does not by itself establish that all workloads have restarted or that other untrusted-input paths are bounded.
Severity is not the same as reachability
The advisory’s High rating communicates the potential availability impact in its scoring model. It does not imply that every installation exposes an unauthenticated network endpoint. A real-world incident requires a reachable application path from adversary-controlled zone text to the vulnerable parser, plus enough resource pressure to affect service. No exploitation-in-the-wild claim is made here.
A useful risk register should therefore separate package present, vulnerable version, reachable parser, attacker-controlled WKS text, and resource isolation. Those five observations produce a more actionable remediation priority than a package name and CVSS number alone.
Primary evidence
- dnspython maintainer security advisory, GHSA-vvf4-9x63-8xvv
- Upstream patch commit 388db14
- Upstream patch commit a62e1be
- dnspython v2.9.2 release
Method: source analysis of the maintainer disclosure and patch references, without an independent resource-exhaustion reproduction.