Http4s: Ember accepts Transfer-Encoding combined with Content-Length (CL.TE request smuggling)
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 HTTP/1.1 does not reject messages containing both Transfer-Encoding and Content-Length, so an intermediary and Ember can select different body framing rules. When ember-server is behind a keep-alive intermediary that forwards both headers and frames by Content-Length, an unauthenticated attacker can smuggle a second request, bypass intermediary access controls, poison caches, or cause a victim request to be joined to an attacker-controlled prefix. The shared response parser can also desynchronize an ember-client connection when a malicious or compromised upstream sends both headers. This issue is fixed in versions 0.23.35 and 1.0.0-M47.
From the CVE record · GitHub_M
Ember HTTP/1.1 accepts messages containing both Transfer-Encoding and Content-Length, allowing different components to disagree on where a message ends. An unauthenticated network attacker can smuggle requests when ember-server sits behind a keep-alive intermediary that forwards both headers and frames by Content-Length. A malicious or compromised upstream can also desynchronize an ember-client connection; no user interaction is described.
Teams using Maven org.http4s:http4s-ember-core_2.12, _2.13, or _3 should check versions below 0.23.35; teams using _2.13 or _3 should also check versions from 1.0.0-M1 through versions before 1.0.0-M47.