VDB
Sign up
HIGH7.5

GHSA-6m4x-pp6q-5jmm

Http4s Ember HTTP/2: unbounded inbound body buffering

Quick fix

GHSA-6m4x-pp6q-5jmm — org.http4s:http4s-ember-core_2.12: upgrade to the fixed version with the command below.

# pom.xml: bump <version>0.23.35</version> for org.http4s:http4s-ember-core_2.12

Details

Ember's HTTP/2 stack replenishes the inbound flow-control window based on bytes received off the wire, not bytes consumed by the application. Received DATA is buffered in an unbounded per-stream channel. Flow control therefore provides no backpressure: a peer can stream a large or unbounded body faster than the application drains it and the connection retains every payload in heap.

This is the read-path mirror of the [outbound queue issue](https://github.com/http4s/http4s/security/advisories/GHSA-8f3q-3jmv-7prw).

This affects an Ember receiving a request body and an Ember client receiving a response body from a hostile server.

### Impact

Unauthenticated remote denial of service (OOM) against any Ember server built `.withHttp2` for a non-draining or slow-draining route, and against an Ember client consuming from a hostile or compromised server.

### Workarounds

- Disable HTTP/2 to remove the vector entirely. - Apply an aggregate request-entity size limit (e.g. `EntityLimiter` middleware) on routes that consume the body. - Ensure handlers fully drain request bodies with aggressive idle timeouts.

Are you affected?

Enter the version of the package you're using.

Affected packages

Maven/org.http4s:http4s-ember-core_2.12
Introduced in: 0Fixed in: 0.23.35
Fix# pom.xml: bump <version>0.23.35</version> for org.http4s:http4s-ember-core_2.12
Maven/org.http4s:http4s-ember-core_2.13
Introduced in: 0Fixed in: 0.23.35
Fix# pom.xml: bump <version>0.23.35</version> for org.http4s:http4s-ember-core_2.13
Maven/org.http4s:http4s-ember-core_3
Introduced in: 0Fixed in: 0.23.35
Fix# pom.xml: bump <version>0.23.35</version> for org.http4s:http4s-ember-core_3
Maven/org.http4s:http4s-ember-core_2.13
Introduced in: 1.0.0-M1Fixed in: 1.0.0-M47
Fix# pom.xml: bump <version>1.0.0-M47</version> for org.http4s:http4s-ember-core_2.13
Maven/org.http4s:http4s-ember-core_3
Introduced in: 1.0.0-M1Fixed in: 1.0.0-M47
Fix# pom.xml: bump <version>1.0.0-M47</version> for org.http4s:http4s-ember-core_3

References