Summary
A vulnerability in blaze-server can merge attacker-controlled HTTP/1.1 chunked-body trailer fields into the request header collection. An unauthenticated remote client may use this behavior to spoof proxy-trusted headers, bypass header-based access controls, influence auditing and rate limits, or terminate pooled backend connections when vulnerable proxy and application configurations are present.
Affected context
The issue can affect http4s applications using BlazeServerBuilder over HTTP/1.1 when routes or middleware trust headers that are expected to be set or sanitized by a fronting proxy. Risk is higher when the proxy removes or normalizes headers in the initial request-header section but forwards chunked request bodies with trailers intact, allowing the backend server to interpret trailer fields as ordinary request headers.
Exploit preconditions
- Attack surface: Network-accessible HTTP/1.1 endpoints served through blaze-server
- Required access: An unauthenticated ability to send requests with chunked transfer encoding and trailer fields
- Trigger point: Processing and merging HTTP trailer fields into
Request.headers - Deployment condition: A fronting proxy and backend application rely on proxy-sanitized headers or permit pooled backend connections
- Why exploitation is possible: Attacker-controlled trailer names and values are treated as trusted request headers after proxy filtering has already occurred
Why this happens
The vulnerability results from incorrect separation of HTTP request-header fields and chunked-body trailer fields. By merging trailers into the normal request header collection, the server allows data that was not present in the proxy-filtered header section to influence application trust decisions.
This behavior maps to CWE-444: Inconsistent Interpretation of HTTP Requests, because different components in the request-processing chain assign different security meanings to the same HTTP message. The mismatch can allow header spoofing and connection-control fields to bypass intermediary policy.
Potential impact
- Spoofed client IP information could bypass allow-lists or distort rate limiting
- Forged host or scheme headers could influence routing, URL generation, or security checks
- Injected authorization-related headers could bypass application trust boundaries
- Audit records could contain attacker-controlled identity or network metadata
- A promoted
Connection: closetrailer could terminate pooled backend connections - Applications could experience service disruption or incorrect proxy-aware behavior
General mitigation guidance
Mitigation generally focuses on preserving the distinction between request headers and trailer fields and reducing trust in client-controlled metadata.
Common defensive patterns include:
- Use HTTP parsing behavior that does not merge untrusted trailers into request headers
- Apply consistent trailer handling and normalization across proxies, servers, and application frameworks
- Treat forwarding and authorization headers as trusted only when established by a verified intermediary
- Derive client identity, scheme, and host information from authenticated proxy channels or validated connection metadata
- Avoid honoring connection-management fields supplied by untrusted request content
- Apply least-privilege authorization decisions and fail closed when trusted-header assumptions are not satisfied
- Configure intermediaries to reject, consume, or safely normalize unsupported trailer fields
How teams detect issues like this
Organizations can assess this issue through:
- Integration tests that send HTTP/1.1 chunked requests with trailer fields matching proxy-filtered headers
- Differential testing between proxy-visible headers and backend application headers
- Static and manual review of middleware that trusts
X-Forwarded-For,X-Real-IP,X-Forwarded-Host, scheme, or authorization headers - Code review checks for unconditional merging of trailer fields into request-header maps
- Proxy policy checks covering trailer forwarding, connection-control fields, and header normalization
- Runtime monitoring for unexpected forwarded-header values, authorization headers, or backend connection churn
Automated security testing and code-review tools can help identify inconsistent HTTP parsing and trust-boundary assumptions.

