http4s: Ember Server Accepts Duplicate Content-Length Headers
- CVE-2026-69217
- GHSA-p83c-4wj9-p6w9
- EUVD-2026-79193
Description
Show the whole descriptionHide the whole description
Ember's HTTP/1.1 parser accepts a request that carries two `Content-Length` headers with differing values, accepting the latter value. [RFC 9112 §6.3](https://www.rfc-editor.org/info/rfc9112/#section-6.3-2.5) requires a recipient to respond `400` (Bad Request) and close the connection. When an Ember server is deployed behind a intermediary that frames on a different occurrence of the header, HTTP request smuggling (CL.CL desync) is possible. ## Impact ### Server The server is vulnerable to HTTP request smuggling when deployed as an origin behind an intermediary that maintains keep-alive connections and frames requests using a different Content-Length value than Ember, which uses a last-wins policy. - Front-end security bypass: the smuggled request reaches paths the intermediary might have blocked, with attacker-chosen method and headers. - Cross-user request hijack: a dangling smuggled prefix concatenates with the next victim's request on the shared backend socket, capturing its sensitive headers (e.g., `Cookie` or `Authorization`). - Cache poisoning: the smuggled response is associated with the next request key in a caching proxy. ### Client The same parser is used by the client and applies to the response path. The threat is narrower and less severe than the server: - The upstream server (origin or intermediary) must be malicious or compromised. - The client must be deployed as a proxy shared across multiple downstream consumers. If the misframed bytes are attached to a different downstream user's request on a pooled connection, cross-user response hijack or cache poisoning are possible. ## Preconditions - Any `EmberServerBuilder` HTTP/1.1 config behind an intermediary - Unauthenticated remote attacker able to reach the intermediary - That intermediary forwards at least two differing `Content-Length` headers without rejecting and frames on a different occurrence of the header - Intermediary keeps persistent upstream connections ## Patches The issue is addressed in http4s-0.23.35. ## Workarounds - Use a strictly-conformant intermediary that rejects differing `Content-Length` with `400` ## Resources - [RFC9112 §6.3: Message Body Length](https://www.rfc-editor.org/info/rfc9112/#name-message-body-length) - [RFC9112 §11.2: Request Smuggling](https://www.rfc-editor.org/info/rfc9112/#name-request-smuggling)
Text from the GitHub Advisory record.
Recommendation
http4s
- If you run 1.0.xupdate to 1.0.0-M47 or laterPatch update: breaking changes are unlikely
- If you run a version before 0.23.35update to 0.23.35 or later
org.http4s:http4s-ember-core_2.12
- If you run a version before 0.23.35update to 0.23.35 or laterorg.http4s:http4s-ember-core_2.12 0.23.35 on its registry (opens in a new tab)
org.http4s:http4s-ember-core_2.13
- If you run 1.0.xupdate to 1.0.0-M47 or laterPatch update: breaking changes are unlikelyorg.http4s:http4s-ember-core_2.13 1.0.0-M47 on its registry (opens in a new tab)
- If you run a version before 0.23.35update to 0.23.35 or laterorg.http4s:http4s-ember-core_2.13 0.23.35 on its registry (opens in a new tab)
org.http4s:http4s-ember-core_3
- If you run 1.0.xupdate to 1.0.0-M47 or laterPatch update: breaking changes are unlikelyorg.http4s:http4s-ember-core_3 1.0.0-M47 on its registry (opens in a new tab)
- If you run a version before 0.23.35update to 0.23.35 or laterorg.http4s:http4s-ember-core_3 0.23.35 on its registry (opens in a new tab)
Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
http4s
Affected versions Fixed in from 1.0.0-M1 to before 1.0.0-M47 1.0.0-M47 before 0.23.35 0.23.35 org.http4s:http4s-ember-core_2.12Maven
Affected versions Fixed in before 0.23.35 0.23.35 org.http4s:http4s-ember-core_2.13Maven
Affected versions Fixed in from 1.0.0-M2 to before 1.0.0-M47 1.0.0-M47 before 0.23.35 0.23.35 org.http4s:http4s-ember-core_3Maven
Affected versions Fixed in from 1.0.0-M2 to before 1.0.0-M47 1.0.0-M47 before 0.23.35 0.23.35
Product versions from the ENISA EUVD record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.