Skip to content

Netty vulnerable to request smuggling due to incorrect parsing of chunk extensions

Low severity GitHub Reviewed Published Sep 3, 2025 in netty/netty • Updated Sep 5, 2025

Package

maven io.netty:netty-codec-http (Maven)

Affected versions

< 4.1.125.Final
>= 4.2.0.Alpha1, < 4.2.5.Final

Patched versions

4.1.125.Final
4.2.5.Final

Description

Summary

A flaw in netty's parsing of chunk extensions in HTTP/1.1 messages with chunked encoding can lead to request smuggling issues with some reverse proxies.

Details

When encountering a newline character (LF) while parsing a chunk extension, netty interprets the newline as the end of the chunk-size line regardless of whether a preceding carriage return (CR) was found. This is in violation of the HTTP 1.1 standard which specifies that the chunk extension is terminated by a CRLF sequence (see the RFC).

This is by itself harmless, but consider an intermediary with a similar parsing flaw: while parsing a chunk extension, the intermediary interprets an LF without a preceding CR as simply part of the chunk extension (this is also in violation of the RFC, because whitespace characters are not allowed in chunk extensions). We can use this discrepancy to construct an HTTP request that the intermediary will interpret as one request but netty will interpret as two (all lines ending with CRLF, notice the LFs in the chunk extension):

POST /one HTTP/1.1
Host: localhost:8080
Transfer-Encoding: chunked

48;\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n0

POST /two HTTP/1.1
Host: localhost:8080
Transfer-Encoding: chunked

0

The intermediary will interpret this as a single request. Once forwarded to netty, netty will interpret it as two separate requests. This is a problem, because attackers can then the intermediary, as well as perform standard request smuggling attacks against other live users (see this Portswigger article).

Impact

This is a request smuggling issue which can be exploited for bypassing front-end access control rules as well as corrupting the responses served to other live clients.

The impact is high, but it only affects setups that use a front-end which:

  1. Interprets LF characters (without preceding CR) in chunk extensions as part of the chunk extension.
  2. Forwards chunk extensions without normalization.

Disclosure

Discussion

Discussion for this vulnerability can be found here:

Credit

  • Credit to @JeppW for uncovering this vulnerability.
  • Credit to @JLLeitschuh at Socket for coordinating the vulnerability disclosure.

References

@normanmaurer normanmaurer published to netty/netty Sep 3, 2025
Published to the GitHub Advisory Database Sep 4, 2025
Reviewed Sep 4, 2025
Last updated Sep 5, 2025

Severity

Low

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(15th percentile)

Weaknesses

Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')

The product acts as an intermediary HTTP agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed HTTP requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination. Learn more on MITRE.

CVE ID

CVE-2025-58056

GHSA ID

GHSA-fghv-69vj-qj49

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.