CVE-2026-42579 Overview
CVE-2026-42579 affects Netty, an asynchronous event-driven network application framework widely used in Java-based services. The Netty DNS codec fails to enforce RFC 1035 domain name constraints during encoding and decoding operations. This creates a bidirectional attack surface where malicious DNS responses can exploit the decoder and user-influenced hostnames can exploit the encoder. The flaw is categorized as improper input validation [CWE-20]. Maintainers fixed the issue in Netty 4.2.13.Final and 4.1.133.Final.
Critical Impact
Attackers can craft malformed DNS messages or hostnames that bypass protocol-level validation, enabling integrity violations in services that rely on Netty's DNS codec for resolution or proxying.
Affected Products
- Netty versions prior to 4.2.13.Final
- Netty versions prior to 4.1.133.Final
- Applications and frameworks embedding the Netty DNS codec (netty-codec-dns)
Discovery Timeline
- 2026-05-13 - CVE-2026-42579 published to NVD
- 2026-05-13 - Last updated in NVD database
Technical Details for CVE-2026-42579
Vulnerability Analysis
Netty provides DNS encoding and decoding through its netty-codec-dns module. RFC 1035 defines strict limits on domain name structure, including a maximum label length of 63 octets, a total name length of 255 octets, and constraints on permitted characters. The vulnerable codec does not enforce these constraints in either direction.
On the decoding path, the codec accepts DNS responses containing oversized labels, malformed pointers, or invalid characters. Downstream consumers receive domain strings the protocol forbids. On the encoding path, the codec serializes hostnames supplied by callers without validating them against RFC 1035. User-influenced inputs flow directly into outbound DNS queries.
This bidirectional weakness allows attackers to inject malformed data into resolver pipelines, cache layers, and logging systems that assume protocol-conformant names.
Root Cause
The root cause is missing input validation [CWE-20] in the Netty DNS codec. The encoder and decoder treat domain name fields as opaque byte sequences instead of enforcing RFC 1035 length and character rules. No structural checks reject labels exceeding 63 octets or total names exceeding 255 octets.
Attack Vector
The attack vector is network-based and requires no authentication or user interaction. An attacker controlling a DNS responder, or able to inject responses into a resolution path, sends crafted records to a Netty-based client. Alternatively, an attacker who supplies hostnames to an application using Netty's DNS encoder can cause malformed queries to be emitted. Successful exploitation impacts integrity by corrupting downstream parsers, caches, or security controls that rely on validated names. See the GitHub Security Advisory GHSA-cm33-6792-r9fm for protocol-level technical details.
Detection Methods for CVE-2026-42579
Indicators of Compromise
- DNS query or response packets containing labels longer than 63 octets or total names exceeding 255 octets.
- DNS records with non-RFC 1035 characters appearing in resolver logs of Netty-based services.
- Unexpected parsing exceptions or truncated names in application logs originating from io.netty.handler.codec.dns classes.
Detection Strategies
- Inventory Java applications and dependencies to identify Netty versions prior to 4.2.13.Final and 4.1.133.Final, including transitive dependencies.
- Inspect DNS traffic from services using Netty for protocol-noncompliant names with packet capture tools or DNS-aware IDS rules.
- Apply software composition analysis to CI/CD pipelines to flag vulnerable netty-codec-dns artifacts before deployment.
Monitoring Recommendations
- Forward DNS traffic logs and application logs to a central analytics platform and alert on parsing anomalies tied to Netty stack traces.
- Monitor egress DNS queries for malformed names that may indicate exploitation of the encoder path.
- Track dependency manifests across production services to detect reintroduction of vulnerable Netty versions.
How to Mitigate CVE-2026-42579
Immediate Actions Required
- Upgrade Netty to 4.2.13.Final or 4.1.133.Final across all affected services and rebuild dependent artifacts.
- Audit transitive dependencies in Maven, Gradle, and SBT projects to ensure no older Netty version is pulled in.
- Validate hostnames supplied by users or upstream systems against RFC 1035 constraints before passing them to the DNS encoder.
Patch Information
The Netty maintainers fixed CVE-2026-42579 in releases 4.2.13.Final and 4.1.133.Final. The patched codec enforces RFC 1035 domain name constraints during both encoding and decoding. Refer to the Netty GitHub Security Advisory for release notes and patch commits.
Workarounds
- Where immediate upgrade is not feasible, wrap the DNS encoder with an application-layer validator that rejects names violating RFC 1035 length and character rules.
- Restrict DNS resolution to trusted resolvers over authenticated channels such as DNS over TLS to reduce response injection exposure.
- Sanitize and length-check any user-controlled hostname before submitting it to Netty-based DNS clients.
# Maven dependency update example
# Replace prior Netty versions with the fixed release
mvn versions:use-dep-version -Dincludes=io.netty:netty-codec-dns -DdepVersion=4.1.133.Final -DforceVersion=true
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


