mediumCVSS 5.3Vulnerability

GHSA-mfg7-5gfp-c4w3

### 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)` invokes `in.retainedDuplicate()` or creates a new buffer `out` when constructing `DefaultDnsRawRecord` - `io.netty.handler.codec.dns.DnsCodecUtil#decompressDomainName` allocates a new `ByteBuf` and passes it to `encodeDomainName()`. If the decompressed domain name contains a null byte (`\0`), `encodeDomainName()` throws an `IllegalArgumentException`, leaking the newly allocated buffer. ### Impact Resource Exhaustion. Any application utilizing Netty's DnsRecordDecoder (such as DnsNameResolver or custom DNS servers) is vulnerable.

Properties

ghsa_id
GHSA-mfg7-5gfp-c4w3
severity
medium
summary
Netty: Memory Leak in DNS Record Decoder via Malformed Domain Names
cvss_score
5.3
cve_id
GHSA-mfg7-5gfp-c4w3
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
is_ghsa_only
true
ghsa_published
2026-07-24T16:52:50Z
source_url
https://github.com/advisories/GHSA-mfg7-5gfp-c4w3
ghsa_updated
2026-07-24T16:52:52Z

Related Entities (4)

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]maven/io.netty:netty-codec-dns

AFFECTS (1)

[Software]maven/io.netty:netty-codec-dns

HAS_WEAKNESS (1)

[Weakness]Missing Release of Resource after Effective Lifetime

Explore deeper with Ninja Signal's threat intelligence graph