MediumGHSA-wm47-8v5p-wjpjBIT-zookeeper-2021-21295CVE-2021-21295

Possible request smuggling in HTTP/2 due missing validation

Published 9 Mar 2021 · Updated 10 Sept 2026

Is your project on an affected io.netty:netty-codec-http2?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
>=4.0.0 <4.1.60.Final
Fixed in
4.1.60.Final
Update to the fixed version for your release line, for example:mvn versions:use-dep-version -Dincludes=io.netty:netty-codec-http2 -DdepVersion=4.1.60.Final -DforceVersion=true
Affected
All versions
Fixed in
No fix released
Affected
All versions
Fixed in
No fix released

Details

Impact

If a Content-Length header is present in the original HTTP/2 request, the field is not validated by Http2MultiplexHandler as it is propagated up. This is fine as long as the request is not proxied through as HTTP/1.1. If the request comes in as an HTTP/2 stream, gets converted into the HTTP/1.1 domain objects (HttpRequest, HttpContent, etc.) via Http2StreamFrameToHttpObjectCodec and then sent up to the child channel's pipeline and proxied through a remote peer as HTTP/1.1 this may result in request smuggling.

In a proxy case, users may assume the content-length is validated somehow, which is not the case. If the request is forwarded to a backend channel that is a HTTP/1.1 connection, the Content-Length now has meaning and needs to be checked.

An attacker can smuggle requests inside the body as it gets downgraded from HTTP/2 to HTTP/1.1. A sample attack request looks like:

POST / HTTP/2
:authority:: externaldomain.com
Content-Length: 4

asdfGET /evilRedirect HTTP/1.1
Host: internaldomain.com

Users are only affected if all of this is true:

  • HTTP2MultiplexCodec or Http2FrameCodec is used
  • Http2StreamFrameToHttpObjectCodec is used to convert to HTTP/1.1 objects
  • These HTTP/1.1 objects are forwarded to another remote peer.

Patches

This has been patched in 4.1.60.Final

Workarounds

The user can do the validation by themselves by implementing a custom ChannelInboundHandler that is put in the ChannelPipeline behind Http2StreamFrameToHttpObjectCodec.

References

Related change to workaround the problem: https://github.com/Netflix/zuul/pull/980

Is GHSA-wm47-8v5p-wjpj in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected io.netty:netty-codec-http2, and gives you the command that fixes it.

More advisories for io.netty:netty-codec-http2

  • HighCVE-2026-56819Netty: HTTP/2 decompression leaks ByteBuf reference count when the decompressor channel is already closed (Direct memory leak / OOM DoS) · 31 Jul 2026
  • MediumCVE-2026-59900Netty: [codec-http2] Lack of Host Header Deduplication in HTTP/2→HTTP/1.x Translation Leads to Request Routing Bypass · 22 Jul 2026
  • MediumCVE-2026-50560Netty susceptible to HTTP/2 Reset Attack with different on-the-wire signature · 15 Jun 2026
  • MediumCVE-2026-48043netty-codec-http2: ByteBuf Reference-Count Leak in DelegatingDecompressorFrameListener Leads to Memory Exhaustion · 11 Jun 2026
  • MediumCVE-2026-47244Netty HTTP/2: Advertised MAX_CONCURRENT_STREAMS are not enforced · 8 Jun 2026
  • HighCVE-2026-42587Netty: HttpContentDecompressor maxAllocation bypass when Content-Encoding set to br/zstd/snappy leads to decompression bomb DoS · 7 May 2026
All 11 advisories for io.netty:netty-codec-http2

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.