CVE-2025-58056: Netty vulnerable to request smuggling due to incorrect parsing of chunk extensions
N/A
Basic Information
Technical Details
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| io.netty:netty-codec-http | maven | < 4.1.125.Final | 4.1.125.Final |
| io.netty:netty-codec-http | maven | >= 4.2.0.Alpha1, < 4.2.5.Final | 4.2.5.Final |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability is a request smuggling issue (CWE-444) in Netty's HTTP codec. It stems from the lenient parsing of chunked transfer encoding headers. According to RFC 9112, chunk headers must be terminated by a CRLF sequence. However, Netty's HttpObjectDecoder accepted a single Line Feed (LF) as a valid terminator.
An attacker could craft a request with a lone LF in the chunk extension. A front-end proxy that correctly follows the RFC might see this as part of the chunk data, while Netty would interpret it as the end of the chunk header, leading to a desynchronization of the request stream between the proxy and the backend Netty application. This allows an attacker to smuggle a second, malicious request.
The analysis of the patch edb55fd8e0a3bcbd85881e423464f585183d1284 reveals the exact location of the flaw. The HttpObjectDecoder.decode method, which manages the HTTP parsing state machine, was invoking a lenient line parser in its READ_CHUNK_SIZE state. The fix involves introducing a strict line parsing mode, which is enabled by default. This is implemented in the HttpObjectDecoder$HeaderParser.parse method, where a check for a preceding Carriage Return (CR) before a Line Feed (LF) is added.
The primary vulnerable function is io.netty.handler.codec.http.HttpObjectDecoder.decode, as it contains the state machine logic that incorrectly handles the READ_CHUNK_SIZE state. The io.netty.handler.codec.http.HttpObjectDecoder$HeaderParser.parse method is also identified as it contains the core faulty parsing logic that was fixed. Both would likely appear in a runtime profile during exploitation.