CVE-2021-21295
JSON

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 packageVersionsReported by
netty io.netty:netty-codec-http2< 4.1.60.FinalCVE List
io.netty:netty-codec-http2 (Maven)from 4.0.0 before 4.1.60.FinalGitHub Advisory Database
org.jboss.netty:netty (Maven)all versionsGitHub Advisory Database
io.netty:netty (Maven)all versionsGitHub Advisory Database
netty nettybefore 4.1.60NVD
netapp oncommand_api_servicesNot specifiedNVD
netapp oncommand_workflow_automationNot specifiedNVD
debian debian_linux10.0NVD
quarkus quarkusup to 1.13.7NVD
apache kudubefore 1.16.0NVD
apache zookeeper3.5.9NVD
oracle communications_cloud_native_core_policy1.14.0NVD

All scores

GitHub_M5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
GitHub5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD2.6low CVSS:2.0AV:N/AC:H/Au:N/C:N/I:P/A:N
Bitnami Vulnerability Databasemedium rating

Classification

CWE-444

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:

  • 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

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.&#xa0;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.&#xa0;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.&#xa0;Esto está bien siempre que la petición no se transmita como HTTP/1.1.&#xa0;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.&#xa0;En un caso de proxy,&#xa0;los usuarios pueden asumir que la longitud del contenido está comprobada de alguna forma, lo que no es el caso.&#xa0;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.&#xa0;Un atacante puede traficar peticiones dentro del cuerpo a medida que se degrada de HTTP/2 a HTTP/1.1.&#xa0;Para visualizar un ejemplo de ataque, consulte el Aviso de GitHub vinculado.&#xa0;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.&#xa0;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

https://github.com/netty/netty/security/advisories/GHSA-wm47-8v5p-wjpjadvisory, third-party-advisory, web
https://github.com/Netflix/zuul/pull/980advisory, patch, third-party-advisory, web
https://github.com/netty/netty/commit/89c241e3b1795ff257af4ad6eadc616cb2fb3dc4advisory, patch, vendor-advisory, web
https://lists.apache.org/thread.html/r02e467123d45006a1dda20a38349e9c74c3a4b53e2e07be0939ecb3f%40%3Cdev.ranger.apache.org%3Emailing-list, web
https://lists.apache.org/thread.html/r7bb3cdc192e9a6f863d3ea05422f09fa1ae2b88d4663e63696ee7ef5%40%3Cdev.ranger.apache.org%3Emailing-list, web
https://lists.apache.org/thread.html/rcd163e421273e8dca1c71ea298dce3dd11b41d51c3a812e0394e6a5d%40%3Ccommits.pulsar.apache.org%3Emailing-list, web
https://lists.apache.org/thread.html/r9924ef9357537722b28d04c98a189750b80694a19754e5057c34ca48%40%3Ccommits.pulsar.apache.org%3Emailing-list, web
https://lists.apache.org/thread.html/rb51d6202ff1a773f96eaa694b7da4ad3f44922c40b3d4e1a19c2f325%40%3Ccommits.pulsar.apache.org%3Emailing-list, web
https://lists.apache.org/thread.html/r790c2926efcd062067eb18fde2486527596d7275381cfaff2f7b3890%40%3Cissues.bookkeeper.apache.org%3Emailing-list, web
https://lists.apache.org/thread.html/r1908a34b9cc7120e5c19968a116ddbcffea5e9deb76c2be4fa461904%40%3Cdev.zookeeper.apache.org%3Emailing-list, web
https://lists.apache.org/thread.html/rb06c1e766aa45ee422e8261a8249b561784186483e8f742ea627bda4%40%3Cdev.kafka.apache.org%3Emailing-list, web
https://lists.apache.org/thread.html/r5e66e286afb5506cdfe9bbf68a323e8d09614f6d1ddc806ed0224700%40%3Cjira.kafka.apache.org%3Emailing-list, web

Related

Sources

SourceRecordLicence
CVE ListCVE-2021-21295 changed 2026-10-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-wm47-8v5p-wjpj changed 2026-09-10CC-BY-4.0
NVDCVE-2021-21295 changed 2026-10-08Public domain
Bitnami Vulnerability DatabaseBIT-ZOOKEEPER-2021-21295 changed 2026-09-08Apache-2.0