CVE-2026-69217: CVE-2026-69217: HTTP Request and Response Smuggling in http4s ember-core
CVE-2026-69217: HTTP Request and Response Smuggling in http4s ember-core Vulnerability ID: CVE-2026-69217 CVSS Score: 8.7 Published: 2026-11-30 CVE-2026-69217 (also tracked as GHSA-p83c-4wj9-p6w9) is an HTTP request
CVE-2026-69217: HTTP Request and Response Smuggling in http4s ember-core
Vulnerability ID: CVE-2026-69217
CVSS Score: 8.7
Published: 2026-11-30
CVE-2026-69217 (also tracked as GHSA-p83c-4wj9-p6w9) is an HTTP request and response smuggling vulnerability in the ember-core module of the http4s Scala library. Prior to versions 0.23.35 and 1.0.0-M47, the HTTP/1.1 message parser failed to reject HTTP messages containing duplicate Content-Length header fields with conflicting values or sign-prefixed numeric values. Instead of returning a 400 Bad Request error as mandated by RFC 9112 Section 6.3, the parser accepted all occurrences sequentially and honored the final Content-Length value, while also permitting negative numbers via Scala's standard string-to-long conversion. When deployed behind a reverse proxy or intermediary that prioritizes the first Content-Length header or handles non-digit characters differently, unauthenticated remote attackers can desynchronize persistent HTTP/1.1 connections to perform web cache poisoning, bypass front-end security controls, and capture cross-user HTTP requests.
TL;DR
An improper Content-Length header validation flaw in the http4s Ember HTTP/1.1 parser allows CL.CL HTTP request smuggling and response misframing when deployed behind intermediaries that interpret duplicate or malformed Content-Length headers inconsistently.
Technical Details
- Vulnerability Type: CWE-444: HTTP Request/Response Smuggling
- Affected Component: org.http4s:http4s-ember-core (Parser.scala)
- Attack Vector: Network (HTTP/1.1 CL.CL Desynchronization)
- CVSS v3.1 Score: 8.7 High (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N)
- EPSS Score: 0.50% (35.69th Percentile)
- Security Impact: Security Control Bypass, Cache Poisoning, Credential Hijacking
- Exploit Status: No Known Public Exploits
- CISA KEV Status: Not Listed
Affected Systems
- org.http4s:http4s-ember-core
- org.http4s:http4s-ember-server
- org.http4s:http4s-ember-client
-
http4s (ember-core, ember-server, ember-client): < 0.23.35 (Fixed in:
0.23.35) -
http4s (ember-core, ember-server, ember-client): >= 1.0.0-M1, < 1.0.0-M47 (Fixed in:
1.0.0-M47)
Code Analysis
Commit: 24e8d34
Enforce strict RFC 9110 8.6 (1*DIGIT) and RFC 9112 6.3 validation on Content-Length headers in ember-core Parser to prevent HTTP request and response smuggling.
File: ember-core/shared/src/main/scala/org/http4s/ember/core/Parser.scala
@@ -22,6 +22,7 @@ import cats.effect.kernel.Ref
import cats.syntax.all._
import fs2._
import org.http4s._
+import org.http4s.internal.CharPredicate
import org.typelevel.ci.CIString
import scodec.bits.ByteVector
@@ -148,11 +149,25 @@ private[ember] object Parser {
name = null // set name back to null
val newHeader = Header.Raw(CIString(hName), hValue) // create header
if (hName.equalsIgnoreCase(contentLengthS)) { // Check if this is content-length.
- try contentLength = hValue.toLong.some
- catch {
- case scala.util.control.NonFatal(e) =>
- progress = Progress.Errored(e)
- }
+ if (hValue.isEmpty || !hValue.forall(CharPredicate.Digit))
+ // RFC 9110 8.6: Content-Length = 1*DIGIT. Anything else (sign
+ // prefix, hex, whitespace, list) is a framing ambiguity and
+ // must be rejected to prevent request smuggling.
+ progress = Progress.Errored(InvalidContentLength)
+ else
+ try {
+ val len = hValue.toLong
+ if (contentLength.exists(_ != len))
+ // RFC 9112 6.3: differing Content-Length values are an
+ // unrecoverable framing error; a repeated identical value
+ // MAY be collapsed to one.
+ progress = Progress.Errored(DuplicateContentLength)
+ else
+ contentLength = Some(len)
+ } catch {
+ case scala.util.control.NonFatal(_) =>
+ progress = Progress.Errored(InvalidContentLength)
+ }
} else if (
hName
.equalsIgnoreCase(transferEncodingS)
@@ -198,6 +213,12 @@ private[ember] object Parser {
case object InvalidHeaderWhitespace extends Exception with NoStackTrace {
override val getMessage = "InvalidHeaderWhitespace"
}
+ case object DuplicateContentLength extends Exception with NoStackTrace {
+ override val getMessage = "DuplicateContentLength"
+ }
+ case object InvalidContentLength extends Exception with NoStackTrace {
+ override val getMessage = "InvalidContentLength"
+ }
case object UnsupportedTransferEncoding extends Exception with NoStackTrace {
override val getMessage = "UnsupportedTransferEncoding"
}
Mitigation Strategies
- Upgrade http4s-ember-core, http4s-ember-server, and http4s-ember-client to the patched releases (0.23.35 or 1.0.0-M47) to enforce RFC 9110 and RFC 9112 Content-Length validation.
- Configure front-end reverse proxies, load balancers, and WAFs to strictly reject HTTP requests containing multiple Content-Length headers or non-digit characters in the Content-Length value.
- Disable backend HTTP/1.1 connection reuse (keep-alive) between the reverse proxy and unpatched Ember servers so each request executes over an isolated TCP socket.
Remediation Steps:
- Audit project build files (build.sbt, pom.xml, or build.sc) and dependency lockfiles to identify all services utilizing org.http4s:http4s-ember-core, http4s-ember-server, or http4s-ember-client.
- Update the http4s version dependency to 0.23.35 or 1.0.0-M47 and rebuild the application artifacts.
- Run sbt dependencyTree (or equivalent build tool inspection) to verify that transitive dependencies do not resolve to an earlier version of http4s-ember-core.
- Deploy the patched application binaries and verify that requests sent directly to the Ember server with two differing Content-Length headers are immediately terminated.
References
- GitHub Security Advisory: GHSA-p83c-4wj9-p6w9
- http4s Fix Commit 24e8d34e3ea89f8f23e0053ec9944f6467e8086d
- http4s Release v0.23.35
- http4s Release v1.0.0-M47
- CVE.org Record: CVE-2026-69217
- NVD Entry: CVE-2026-69217
- CVE v5 Record JSON: CVE-2026-69217
Read the full report for CVE-2026-69217 on our website for more details including interactive diagrams and full exploit analysis.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.