blaze: Chunked-body trailer fields promoted into Request.headers in blaze-server (front-end header-sanitization bypass)
http4s blaze
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| org.http4s:blaze-http_2.13 Maven |
|
|
| org.http4s:blaze-http_2.12 Maven |
|
|
http4s blaze
| Product | Affected | Fixed in |
|---|---|---|
| org.http4s:blaze-http_2.13 Maven |
|
|
| org.http4s:blaze-http_2.12 Maven |
|
|
| org.http4s:blaze-http_3 Maven |
|
|
blaze is a Scala library for building asynchronous pipelines, with a focus on network IO. Prior to 0.23.18 and 1.0.0-M42, blaze-server can merge HTTP/1.1 chunked-body trailer fields into Request.headers. Because trailer fields are attacker-controlled, an unauthenticated remote client can inject arbitrary header names and values, including X-Forwarded-For and internal authorization headers, that a fronting proxy sanitized from the request-header section, bypassing header-based trust decisions in the application. Any http4s application using BlazeServerBuilder over HTTP/1.1 whose routes or middleware trust proxy-set headers, including X-Forwarded-For, X-Real-IP, and X-Forwarded-Host, is affected. If a fronting proxy strips or normalizes those headers but forwards chunked bodies with trailers intact, an attacker can spoof client IP for allow-lists, rate limits, or auditing, forge the https scheme, or inject internal authorization headers. A promoted Connection: close trailer is also honored, allowing attacker-controlled termination of pooled backend connections. This issue is fixed in versions 0.23.18 and 1.0.0-M42.
From the CVE record · GitHub_M
blaze-server can merge attacker-controlled HTTP/1.1 chunked-body trailers into request headers. An unauthenticated remote client can use this to bypass header-based trust decisions in applications using BlazeServerBuilder when a fronting proxy sanitizes request headers but forwards trailers intact. No user interaction is required.
Check http4s applications using BlazeServerBuilder with Maven org.http4s:blaze-http_2.12 below 0.23.18, or blaze-http_2.13 or blaze-http_3 below 0.23.18 or from 1.0.0-M1 through versions before 1.0.0-M42.