CVE-2026-73508
Netty: Memory Leak in DNS Record Decoder via Malformed Domain Names
Description
Summary
A memory leak can be caused in Netty's DNS codec by sending malicious DNS packets containing invalid domain names. Because the leak occurs incrementally per packet, sustained malicious requests will cause a gradual Denial of Service.
Details
Inside io.netty.handler.codec.dns.AbstractDnsRecord, the parsed domain name string is passed to IDN.toASCII(name). If the domain name contains characters that violate IDNA rules, IDN.toASCII throws an IllegalArgumentException.
Because this exception occurs inside the constructor before the DnsRecord instance can assign the buffer to its content field for later release, the ByteBuf whose reference count was incremented (or newly allocated) is never released, resulting in a direct memory leak.
There are several places where variants of this leak happen:
io.netty.handler.codec.dns.DefaultDnsRecordDecoder#decodeRecord(java.lang.String, io.netty.handler.codec.dns.DnsRecordType, int, long, io.netty.buffer.ByteBuf, int, int)invokesin.retainedDuplicate()or creates a new bufferoutwhen constructingDefaultDnsRawRecordio.netty.handler.codec.dns.DnsCodecUtil#decompressDomainNameallocates a newByteBufand passes it toencodeDomainName(). If the decompressed domain name contains a null byte (\0),encodeDomainName()throws anIllegalArgumentException, leaking the newly allocated buffer.
Impact
Resource Exhaustion. Any application utilizing Netty's DnsRecordDecoder (such as DnsNameResolver or custom DNS servers) is vulnerable.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| io.netty » netty-codec-dns | < 4.1.136.Final>= 4.2.0.Final, < 4.2.16.Final | 4.1.136.Final, 4.2.16.Final |
Blast radius
73% of the dependent artifacts (14,250) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 5,561 |
| 2 hops | 42,403 |
| 3 hops | 228,413 |
| 4 hops | 176,728 |
| 5 hops | 165,935 |
| 6 hops | 146,655 |
Most used dependents
- io.netty » netty-all3,584 usages
- org.apache.hadoop » hadoop-common3,482 usages
- org.apache.spark » spark-sql3,174 usages
- org.springframework.boot » spring-boot-starter-data-redis3,154 usages
- org.apache.spark » spark-core2,899 usages
- org.springframework.boot » spring-boot-starter-webflux2,764 usages
- io.vertx » vertx-core2,116 usages
- org.seleniumhq.selenium » selenium-java2,089 usages
- org.apache.zookeeper » zookeeper2,044 usages
- org.apache.hadoop » hadoop-client1,796 usages
- org.apache.kafka » kafka1,450 usages
- org.apache.hadoop » hadoop-hdfs1,377 usages
- org.apache.hadoop » hadoop-mapreduce-client-core1,366 usages
- io.quarkus » quarkus-resteasy1,251 usages
- org.apache.curator » curator-recipes1,197 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
- Webhttps://github.com/netty/netty/security/advisories/GHSA-mfg7-5gfp-c4w3
- Webhttps://github.com/netty/netty/pull/17063
- Webhttps://github.com/netty/netty/pull/17065
- Webhttps://github.com/netty/netty/commit/5b68c61f37aa4a3045cba624cbea239655c9003b
- Webhttps://github.com/netty/netty/commit/bb2ff68a1fb71cb4b0eb9a9e17b66c52aff680c6
- Packagehttps://github.com/netty/netty
- Webhttps://github.com/netty/netty/releases/tag/netty-4.1.136.Final
- Webhttps://github.com/netty/netty/releases/tag/netty-4.2.16.Final
