5.9medium
Possible request smuggling in HTTP/2 due missing validation
- Severity
- 5.9medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 18.9% (higher than 97% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-wm47-8v5p-wjpjBIT-ZOOKEEPER-2021-21295
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`.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| netty io.netty:netty-codec-http2 | < 4.1.60.Final | CVE List |
| io.netty:netty-codec-http2 (Maven) | from 4.0.0 before 4.1.60.Final | GitHub Advisory Database |
| org.jboss.netty:netty (Maven) | all versions | GitHub Advisory Database |
| io.netty:netty (Maven) | all versions | GitHub Advisory Database |
| netty netty | before 4.1.60 | NVD |
| netapp oncommand_api_services | Not specified | NVD |
| netapp oncommand_workflow_automation | Not specified | NVD |
| debian debian_linux | 10.0 | NVD |
| quarkus quarkus | up to 1.13.7 | NVD |
| apache kudu | before 1.16.0 | NVD |
| apache zookeeper | 3.5.9 | NVD |
| oracle communications_cloud_native_core_policy | 1.14.0 | NVD |
| zookeeper (Bitnami) | from 3.5.9 before 3.5.10 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 5.9medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 2.6low CVSS:2.0 | AV:N/AC:H/Au:N/C:N/I:P/A:N |
| Bitnami Vulnerability Database | medium rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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`.
GitHub Advisory Database
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:
HTTP2MultiplexCodecorHttp2FrameCodecis usedHttp2StreamFrameToHttpObjectCodecis 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
NVD (es)
Netty es un framework de aplicación de red de código abierto y controlado por eventos asíncronos para el desarrollo rápido de servidores y clientes de protocolo de alto rendimiento mantenibles. En Netty (io.netty: netty-codec-http2) versiones anteriores a la versión 4.1.60.Final, se presenta una vulnerabilidad que permite el tráfico de peticiones. Si existe un encabezado Content-Length en la petición HTTP/2 original, el campo no es comprobado por "Http2MultiplexHandler" a medida que se propaga. Esto está bien siempre que la petición no se transmita como HTTP/1.1. Si la petición llega como una secuencia HTTP/2, se convierte en los objetos de dominio HTTP/1.1 ("HttpRequest", "HttpContent", etc.) por medio de "Http2StreamFrameToHttpObjectCodec" y luego se envía al pipeline del canal secundario y al proxy mediante un peer remoto como HTTP/1.1, esto puede resultar en el tráfico de peticiones. En un caso de proxy, los usuarios pueden asumir que la longitud del contenido está comprobada de alguna forma, lo que no es el caso. Si la petición se reenvía a un canal de backend que es una conexión HTTP/1.1, la longitud del contenido ahora tiene significado y debe verificarse. Un atacante puede traficar peticiones dentro del cuerpo a medida que se degrada de HTTP/2 a HTTP/1.1. Para visualizar un ejemplo de ataque, consulte el Aviso de GitHub vinculado. Los usuarios solo están afectados si todo esto es cierto: se usa "HTTP2MultiplexCodec" o "Http2FrameCodec", se usa "Http2StreamFrameToHttpObjectCodec" para convertir a objetos HTTP/1.1, y estos objetos HTTP/1.1 se reenvían a otro par remoto. Esto ha sido parcheado en la versión 4.1.60.Final. Como solución, el usuario puede hacer la comprobación por sí mismo implementando un "ChannelInboundHandler" personalizado que se coloca en el "ChannelPipeline" detrás de "Http2StreamFrameToHttpObjectCodec"
References
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-21295 changed 2026-10-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-wm47-8v5p-wjpj changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2021-21295 changed 2026-10-08 | Public domain |
| Bitnami Vulnerability Database | BIT-ZOOKEEPER-2021-21295 changed 2026-09-08 | Apache-2.0 |