CVE-2021-21295
CVE-2021-21295 · Possible request smuggling in HTTP/2 due missing validation
This page contains facts from public vulnerability sources. Check the original advisory before updating.
This page shows selected source facts. See the linked advisories for the complete description and affected versions.
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`.
CVSS 5.9 · Medium · EPSS 18.9% · Fix available
- Published
- Updated
Stack: system
Affected products and versions
io.netty:netty-codec-http2
- Versions
- < 4.1.60.Final: Affected
No fix published
netty Debian:12
- Affected ranges
- ECOSYSTEM: < 1:4.1.48-3
Update to 1:4.1.48-3
netty Debian:13
- Affected ranges
- ECOSYSTEM: < 1:4.1.48-3
Update to 1:4.1.48-3
netty Debian:14
- Affected ranges
- ECOSYSTEM: < 1:4.1.48-3
Update to 1:4.1.48-3
netty Ubuntu:Pro:14.04:LTS
- Versions
- 1:3.2.6.Final-2
- 1:3.2.6.Final-2+deb8u2build0.14.04.1~esm1
- 1:3.2.6.Final-2+deb8u2ubuntu0.1~esm1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
netty Ubuntu:Pro:16.04:LTS
- Versions
- 1:3.2.6.Final-2
- 1:4.0.32-1
- 1:4.0.33-1
- 1:4.0.34-1
- Affected ranges
- ECOSYSTEM: < 1:4.0.34-1ubuntu0.1~esm1
Update to 1:4.0.34-1ubuntu0.1~esm1
netty Ubuntu:Pro:18.04:LTS
- Versions
- 1:4.1.7-4
- 1:4.1.7-4ubuntu0.1~esm1
- 1:4.1.7-4ubuntu0.1
- 1:4.1.7-4ubuntu0.1+esm1
- Affected ranges
- ECOSYSTEM: < 1:4.1.7-4ubuntu0.1+esm2
Update to 1:4.1.7-4ubuntu0.1+esm2
netty Ubuntu:Pro:20.04:LTS
- Versions
- 1:4.1.33-1
- 1:4.1.33-2
- 1:4.1.33-3
- 1:4.1.45-1
- Affected ranges
- ECOSYSTEM: < 1:4.1.45-1ubuntu0.1~esm1
Update to 1:4.1.45-1ubuntu0.1~esm1
netty Ubuntu:22.04:LTS
- Versions
- 1:4.1.48-4
- Affected ranges
- ECOSYSTEM: < 1:4.1.48-4+deb11u1build0.22.04.1
Update to 1:4.1.48-4+deb11u1build0.22.04.1
Original sources
- https://github.com/netty/netty/security/advisories/GHSA-wm47-8v5p-wjpj
- https://github.com/Netflix/zuul/pull/980
- https://github.com/netty/netty/commit/89c241e3b1795ff257af4ad6eadc616cb2fb3dc4
- https://lists.apache.org/thread.html/r02e467123d45006a1dda20a38349e9c74c3a4b53e2e07be0939ecb3f%40%3Cdev.ranger.apache.org%3E
- https://lists.apache.org/thread.html/r7bb3cdc192e9a6f863d3ea05422f09fa1ae2b88d4663e63696ee7ef5%40%3Cdev.ranger.apache.org%3E
- https://lists.apache.org/thread.html/rcd163e421273e8dca1c71ea298dce3dd11b41d51c3a812e0394e6a5d%40%3Ccommits.pulsar.apache.org%3E
- https://lists.apache.org/thread.html/r9924ef9357537722b28d04c98a189750b80694a19754e5057c34ca48%40%3Ccommits.pulsar.apache.org%3E
- https://lists.apache.org/thread.html/rb51d6202ff1a773f96eaa694b7da4ad3f44922c40b3d4e1a19c2f325%40%3Ccommits.pulsar.apache.org%3E
- https://lists.apache.org/thread.html/r790c2926efcd062067eb18fde2486527596d7275381cfaff2f7b3890%40%3Cissues.bookkeeper.apache.org%3E
- https://lists.apache.org/thread.html/r1908a34b9cc7120e5c19968a116ddbcffea5e9deb76c2be4fa461904%40%3Cdev.zookeeper.apache.org%3E
- https://lists.apache.org/thread.html/rb06c1e766aa45ee422e8261a8249b561784186483e8f742ea627bda4%40%3Cdev.kafka.apache.org%3E
- https://lists.apache.org/thread.html/r5e66e286afb5506cdfe9bbf68a323e8d09614f6d1ddc806ed0224700%40%3Cjira.kafka.apache.org%3E
- https://lists.apache.org/thread.html/rb592033a2462548d061a83ac9449c5ff66098751748fcd1e2d008233%40%3Cissues.zookeeper.apache.org%3E
- https://lists.apache.org/thread.html/r59bac5c09f7a4179b9e2460e8f41c278aaf3b9a21cc23678eb893e41%40%3Cjira.kafka.apache.org%3E
- https://lists.apache.org/thread.html/rc0087125cb15b4b78e44000f841cd37fefedfda942fd7ddf3ad1b528%40%3Cissues.zookeeper.apache.org%3E
- https://lists.apache.org/thread.html/r1bca0b81193b74a451fc6d687ab58ef3a1f5ec40f6c61561d8dd9509%40%3Cissues.zookeeper.apache.org%3E
- https://lists.apache.org/thread.html/r3ff9e735ca33612d900607dc139ebd38a64cadc6bce292e53eb86d7f%40%3Cissues.zookeeper.apache.org%3E
- https://lists.apache.org/thread.html/r312ce5bd3c6bf08c138349b507b6f1c25fe9cf40b6f2b0014c9d12b1%40%3Cnotifications.zookeeper.apache.org%3E
- https://lists.apache.org/thread.html/rcfc535afd413d9934d6ee509dce234dac41fa3747a7555befb17447e%40%3Cissues.zookeeper.apache.org%3E
- https://lists.apache.org/thread.html/r3c293431c781696681abbfe1c573c2d9dcdae6fd3ff330ea22f0433f%40%3Cjira.kafka.apache.org%3E
- https://lists.apache.org/thread.html/r9051e4f484a970b5566dc1870ecd9c1eb435214e2652cf3ea4d0c0cc%40%3Cjira.kafka.apache.org%3E
- https://lists.apache.org/thread.html/rbadcbcb50195f00bbd196403865ced521ca70787999583c07be38d0e%40%3Cnotifications.zookeeper.apache.org%3E
- https://lists.apache.org/thread.html/r67e6a636cbc1958383a1cd72b7fd0cd7493360b1dd0e6c12f5761798%40%3Cnotifications.zookeeper.apache.org%3E
- https://nvd.nist.gov/vuln/detail/CVE-2021-21295