# CVE-2021-21295: Possible request smuggling in HTTP/2 due missing validation


- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 9 Mar 2021
- **Updated:** 8 Oct 2026
- **Also known as:** BIT-zookeeper-2021-21295, CLEANSTART-2026-GV36158, DEBIAN-CVE-2021-21295, GHSA-wm47-8v5p-wjpj, UBUNTU-CVE-2021-21295, openSUSE-SU-2021:0448-1

## What is CVE-2021-21295?

CVE-2021-21295 is a medium-severity vulnerability in Debian Debian Linux, published on 9 Mar 2021. 

### Official description

Netty is an open-source, asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients. In Netty (io.netty:netty-codec-http2) before version 4.1.60.Final there is a vulnerability that enables request smuggling. 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. For an example attack refer to the linked GitHub Advisory. 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, and these HTTP/1.1 objects are forwarded to another remote peer. This has been patched in 4.1.60.Final As a workaround, the user can do the validation by themselves by implementing a custom `ChannelInboundHandler` that is put in the `ChannelPipeline` behind `Http2StreamFrameToHttpObjectCodec`.

Weakness: CWE-444 (Inconsistent Interpretation of HTTP Requests)

## Which versions are affected by CVE-2021-21295?

7 open source packages ship an affected version, including io.netty:netty, zookeeper and io.netty:netty-codec-http2. It affects 8 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `io.netty:netty` | Maven | All versions | None |
| `io.netty:netty` | Maven | All versions | None |
| `zookeeper` | Bitnami | From 3.5.9 | 3.5.10 |
| `io.netty:netty-codec-http2` | Maven | From 4.0.0 | 4.1.60.Final |
| `io.netty:netty-codec-http2` | Maven | From 4.0.0 | 4.1.60.Final |
| `org.jboss.netty:netty` | Maven | All versions | None |
| `org.jboss.netty:netty` | Maven | All versions | None |
| `netty` | openSUSE:Leap 15.2 | All versions | 4.1.13-lp152.3.3.1 |

Products: Apache Kudu, Apache Zookeeper, Debian Debian Linux, Netapp Oncommand Api Services, Netapp Oncommand Workflow Automation, Netty Netty, Oracle Communications Cloud Native Core Policy, Quarkus Quarkus.

## How do I fix CVE-2021-21295?

Upgrade to a fixed version.

## Is CVE-2021-21295 being exploited?

There is no known exploitation of CVE-2021-21295 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-21295 and fix it if it is affected.

What it is: CVE-2021-21295 is a medium-severity vulnerability in Debian Debian Linux, published on 9 Mar 2021. 
Exploitation: There is no known exploitation of CVE-2021-21295 in the wild and no public exploit code.

Affected packages and fixed versions:
- io.netty:netty (Maven): affected all versions; no fix listed
- io.netty:netty (Maven): affected all versions; no fix listed
- zookeeper (Bitnami): affected from 3.5.9; fixed in 3.5.10
- io.netty:netty-codec-http2 (Maven): affected from 4.0.0; fixed in 4.1.60.Final
- io.netty:netty-codec-http2 (Maven): affected from 4.0.0; fixed in 4.1.60.Final
- org.jboss.netty:netty (Maven): affected all versions; no fix listed
- org.jboss.netty:netty (Maven): affected all versions; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-21295/ (Markdown: https://insights.sbomify.com/CVE-2021-21295/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-21295
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-21295
- OSV: https://osv.dev/vulnerability/CVE-2021-21295

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-21295/
Summaries are generated and may contain mistakes; the official description above is the record.
