CVE-2023-44487
HTTP/2 Stream Cancellation Attack
Description
HTTP/2 Rapid reset attack
The HTTP/2 protocol allows clients to indicate to the server that a previous stream should be canceled by sending a RST_STREAM frame. The protocol does not require the client and server to coordinate the cancellation in any way, the client may do it unilaterally. The client may also assume that the cancellation will take effect immediately when the server receives the RST_STREAM frame, before any other data from that TCP connection is processed.
Abuse of this feature is called a Rapid Reset attack because it relies on the ability for an endpoint to send a RST_STREAM frame immediately after sending a request frame, which makes the other endpoint start working and then rapidly resets the request. The request is canceled, but leaves the HTTP/2 connection open.
The HTTP/2 Rapid Reset attack built on this capability is simple: The client opens a large number of streams at once as in the standard HTTP/2 attack, but rather than waiting for a response to each request stream from the server or proxy, the client cancels each request immediately.
The ability to reset streams immediately allows each connection to have an indefinite number of requests in flight. By explicitly canceling the requests, the attacker never exceeds the limit on the number of concurrent open streams. The number of in-flight requests is no longer dependent on the round-trip time (RTT), but only on the available network bandwidth.
In a typical HTTP/2 server implementation, the server will still have to do significant amounts of work for canceled requests, such as allocating new stream data structures, parsing the query and doing header decompression, and mapping the URL to a resource. For reverse proxy implementations, the request may be proxied to the backend server before the RST_STREAM frame is processed. The client on the other hand paid almost no costs for sending the requests. This creates an exploitable cost asymmetry between the server and the client.
Multiple software artifacts implementing HTTP/2 are affected. This advisory was originally ingested from the swift-nio-http2 repo advisory and their original conent follows.
swift-nio-http2 specific advisory
swift-nio-http2 is vulnerable to a denial-of-service vulnerability in which a malicious client can create and then reset a large number of HTTP/2 streams in a short period of time. This causes swift-nio-http2 to commit to a large amount of expensive work which it then throws away, including creating entirely new Channels to serve the traffic. This can easily overwhelm an EventLoop and prevent it from making forward progress.
swift-nio-http2 1.28 contains a remediation for this issue that applies reset counter using a sliding window. This constrains the number of stream resets that may occur in a given window of time. Clients violating this limit will have their connections torn down. This allows clients to continue to cancel streams for legitimate reasons, while constraining malicious actors.
Affected Maven artifacts (10)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| com.typesafe.akka » akka-http-core | < 10.5.3 | 10.5.3 |
| com.typesafe.akka » akka-http-core_2.11 | <= 10.1.15 | - |
| com.typesafe.akka » akka-http-core_2.12 | < 10.5.3 | 10.5.3 |
| com.typesafe.akka » akka-http-core_2.13 | < 10.5.3 | 10.5.3 |
| org.apache.tomcat » tomcat-coyote | >= 8.5.0, < 8.5.94>= 9.0.0, < 9.0.81>= 10.0.0, < 10.1.14>= 11.0.0-M1, < 11.0.0-M12 | 8.5.94, 9.0.81, 10.1.14, 11.0.0-M12 |
| org.apache.tomcat.embed » tomcat-embed-core | >= 8.5.0, < 8.5.94>= 9.0.0, < 9.0.81>= 10.0.0, < 10.1.14>= 11.0.0-M1, < 11.0.0-M12 | 8.5.94, 9.0.81, 10.1.14, 11.0.0-M12 |
| org.eclipse.jetty.http2 » http2-common | >= 9.3.0, < 9.4.53>= 10.0.0, < 10.0.17>= 11.0.0, < 11.0.17 | 9.4.53, 10.0.17, 11.0.17 |
| org.eclipse.jetty.http2 » http2-server | >= 9.3.0, < 9.4.53>= 10.0.0, < 10.0.17>= 11.0.0, < 11.0.17 | 9.4.53, 10.0.17, 11.0.17 |
| org.eclipse.jetty.http2 » jetty-http2-common | >= 12.0.0, < 12.0.2 | 12.0.2 |
| org.eclipse.jetty.http2 » jetty-http2-server | >= 12.0.0, < 12.0.2 | 12.0.2 |
Blast radius
66% of the dependent artifacts (18,300) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 34,915 |
| 2 hops | 160,216 |
| 3 hops | 558,998 |
| 4 hops | 427,449 |
| 5 hops | 216,475 |
| 6 hops | 76,363 |
Most used dependents
- org.springframework.boot » spring-boot-starter-web19,081 usages
- org.apache.hadoop » hadoop-common3,482 usages
- org.apache.spark » spark-sql3,174 usages
- org.apache.spark » spark-core2,899 usages
- com.typesafe.play » play-test1,902 usages
- com.github.tomakehurst » wiremock1,838 usages
- org.apache.hadoop » hadoop-client1,796 usages
- org.wso2.carbon » org.wso2.carbon.core1,598 usages
- org.apache.kafka » kafka1,450 usages
- org.apache.thrift » libthrift1,388 usages
- org.apache.hadoop » hadoop-mapreduce-client-core1,366 usages
- org.springframework.boot » spring-boot-starter-websocket1,319 usages
- org.scalatestplus.play » scalatestplus-play1,286 usages
- com.github.tomakehurst » wiremock-jre81,180 usages
- org.springframework.boot » spring-boot-starter-thymeleaf1,158 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects Go (1 package) SwiftURL (1 package) . See all on OSV
References
- Webhttps://github.com/apple/swift-nio-http2/security/advisories/GHSA-qppj-fm5r-hxr3
- Webhttps://github.com/h2o/h2o/security/advisories/GHSA-2m7v-gc89-fjqf
- Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2023-44487
- Webhttps://github.com/alibaba/tengine/issues/1872
- Webhttps://github.com/apache/apisix/issues/10320
- Webhttps://github.com/akka/akka-http/issues/4323
- Webhttps://github.com/varnishcache/varnish-cache/issues/3996
- Webhttps://github.com/tempesta-tech/tempesta/issues/1986
- Webhttps://github.com/Azure/AKS/issues/3947
- Webhttps://github.com/opensearch-project/data-prepper/issues/3474
- Webhttps://github.com/caddyserver/caddy/issues/5877
- Webhttps://github.com/openresty/openresty/issues/930
- Webhttps://github.com/dotnet/announcements/issues/277
- Webhttps://github.com/eclipse/jetty.project/issues/10679
- Webhttps://github.com/etcd-io/etcd/issues/16740
- Webhttps://github.com/golang/go/issues/63417
- Webhttps://github.com/ninenines/cowboy/issues/1615
- Webhttps://github.com/haproxy/haproxy/issues/2312
- Webhttps://github.com/hyperium/hyper/issues/3337
- Webhttps://github.com/kazu-yamamoto/http2/issues/93
- Webhttps://github.com/junkurihara/rust-rpxy/issues/97
- Webhttps://github.com/microsoft/CBL-Mariner/pull/6381
- Webhttps://github.com/linkerd/website/pull/1695/commits/4b9c6836471bc8270ab48aae6fd2181bc73fd632
- Webhttps://github.com/line/armeria/pull/5232
- Webhttps://github.com/kubernetes/kubernetes/pull/121120
- Webhttps://github.com/apache/httpd-site/pull/10
- Webhttps://github.com/projectcontour/contour/pull/5826
- Webhttps://github.com/apache/trafficserver/pull/10564
- Webhttps://github.com/nghttp2/nghttp2/pull/1961
- Webhttps://github.com/h2o/h2o/pull/3291
- Webhttps://github.com/grpc/grpc-go/pull/6703
- Webhttps://github.com/nodejs/node/pull/50121
- Webhttps://github.com/envoyproxy/envoy/pull/30055
- Webhttps://github.com/facebook/proxygen/pull/466
- Webhttps://github.com/akka/akka-http/pull/4325
- Webhttps://github.com/akka/akka-http/pull/4324
- Webhttps://github.com/netty/netty/commit/58f75f665aa81a8cbcf6ffa74820042a285c5e61
- Webhttps://github.com/apache/tomcat/commit/944332bb15bd2f3bf76ec2caeb1ff0a58a3bc628
- Webhttps://github.com/kazu-yamamoto/http2/commit/f61d41a502bd0f60eb24e1ce14edc7b6df6722a1
- Webhttps://lists.w3.org/Archives/Public/ietf-http-wg/2023OctDec/0025.html
