Http4s Ember HTTP/2: unbounded inbound body buffering
http4s
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| org.http4s:http4s-ember-core_2.12 Maven |
|
|
| org.http4s:http4s-ember-core_2.13 Maven |
|
|
http4s
| Product | Affected | Fixed in |
|---|---|---|
| org.http4s:http4s-ember-core_2.12 Maven |
|
|
| org.http4s:http4s-ember-core_2.13 Maven |
|
|
1.0.0-M47| org.http4s:http4s-ember-core_3 Maven |
|
|
Http4s is a Scala interface for HTTP services. Prior to 0.23.35 and 1.0.0-M47, Ember’s HTTP/2 flow-control window is replenished according to bytes received from the network rather than bytes consumed by the application, while each stream stores DATA in an unbounded channel. A hostile peer can therefore send a body faster than a slow or non-draining application consumes it, retaining payloads in heap on an ember-server or ember-client configured with withHttp2. The patch bounds the per-stream H2Connection body channel so application consumption applies backpressure. This issue is fixed in versions 0.23.35 and 1.0.0-M47.
From the CVE record · GitHub_M
Ember’s HTTP/2 flow control can retain unbounded request or response body data in heap. A hostile network peer can exhaust memory by sending data faster than the application consumes it when ember-server or ember-client is configured with withHttp2.
Teams running Maven org.http4s:http4s-ember-core_2.12 below 0.23.35, or http4s-ember-core_2.13 or http4s-ember-core_3 below 0.23.35 or from 1.0.0-M1 through 1.0.0-M46, should check their deployments.