GHSA-mfg7-5gfp-c4w3: Medium severity maven/io.netty:netty-codec-dns vulnerability

Published Jul 24, 2026
·
Updated

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.

Affected Software

2 affected componentsFixes available
maven/io.netty:netty-codec-dns<=4.1.135.Final
4.1.136.Final
maven/io.netty:netty-codec-dns>=4.2.0.Final<=4.2.15.Final
4.2.16.Final

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/io.netty:netty-codec-dns to a version that resolves this vulnerability.

    Fixed in 4.1.136.Final
  2. Upgrade

    Upgrade maven/io.netty:netty-codec-dns to a version that resolves this vulnerability.

    Fixed in 4.2.16.Final

Event History

Jul 24, 2026
Advisory Published
via GitHub·04:52 PM
Data Sourced
via GitHub·04:52 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of GHSA-mfg7-5gfp-c4w3?

The severity of GHSA-mfg7-5gfp-c4w3 is rated as medium with a CVSS score of 5.3.

2

What kind of vulnerability is GHSA-mfg7-5gfp-c4w3?

GHSA-mfg7-5gfp-c4w3 describes a memory leak vulnerability in Netty's DNS codec.

3

How does the memory leak occur in GHSA-mfg7-5gfp-c4w3?

The memory leak occurs due to malicious DNS packets containing invalid domain names sent to the Netty DNS codec.

4

What may be a consequence of exploiting GHSA-mfg7-5gfp-c4w3?

Exploiting GHSA-mfg7-5gfp-c4w3 can lead to a gradual Denial of Service due to sustained malicious requests.

5

How can I mitigate GHSA-mfg7-5gfp-c4w3?

To mitigate GHSA-mfg7-5gfp-c4w3, updating to the latest version of the Netty library that addresses the vulnerability is recommended.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203