Impact
The Erlang/OTP httpd server contains an HTTP request smuggling vulnerability when processing requests with duplicate Content-Length headers. When multiple Content-Length headers with different values are present, httpd uses the first value without validating that all values are identical, violating RFC 9112 Section 6.3.
This vulnerability enables HTTP request smuggling attacks when httpd is deployed behind a reverse proxy, load balancer, or CDN that uses a different Content-Length resolution strategy (e.g., "last-wins" instead of "first-wins"). Successful exploitation can lead to:
- Authentication bypass: Smuggled requests can bypass proxy-layer authentication and access protected backend resources
- Cache poisoning: Attackers can poison caches with malicious content by desynchronizing request/response boundaries
- Request hijacking: Smuggled requests can be prepended to legitimate user requests on persistent connections, enabling unauthorized actions
You are affected if:
- You deploy httpd behind a reverse proxy, load balancer, or CDN
- The frontend proxy uses a different Content-Length handling strategy than httpd
- HTTP persistent connections (keep-alive) are enabled
You are NOT affected if:
- You run httpd as a standalone server without a frontend proxy
- Your frontend proxy rejects requests with duplicate Content-Length headers
- Your frontend proxy uses the same first-wins strategy as httpd
RFC Violation:
RFC 9112 Section 6.3, Point 5 requires servers to reject requests with multiple Content-Length headers having different values with a 400 Bad Request response.
CWE Classification:
- CWE-444: Inconsistent Interpretation of HTTP Requests (HTTP Request Smuggling)
CAPEC Classification:
- CAPEC-33: HTTP Request Smuggling
Workarounds
-
Configure frontend proxy to reject duplicate Content-Length headers (recommended)
- Most modern proxies support strict header validation modes
-
Disable HTTP keep-alive on httpd
- Add
{keep_alive, false} to httpd configuration
- This prevents request smuggling by closing connections after each request
- Note: This impacts performance for clients making multiple requests
-
Deploy Web Application Firewall (WAF)
- Configure WAF rules to reject requests with multiple Content-Length headers
Affected/Unaffected Versions
A version larger than or equal to one of the listed patched versions is unaffected; otherwise, a version that satisfies an expression listed under affected versions is affected, and if it does not, it is unaffected.
The documentation of the new OTP version scheme describes how versions should be compared. Note that versions used prior to OTP 17.0, when the new OTP version scheme was introduced, are never listed since it is not well defined how to compare those versions.
In the case of this vulnerability, versions prior to OTP 17.0 are likely also affected.
Credits
Thanks to Luigino Camastra (LuiginoC) for finding and responsibly disclosing this vulnerability to the Erlang/OTP project.
Impact
The Erlang/OTP httpd server contains an HTTP request smuggling vulnerability when processing requests with duplicate Content-Length headers. When multiple Content-Length headers with different values are present, httpd uses the first value without validating that all values are identical, violating RFC 9112 Section 6.3.
This vulnerability enables HTTP request smuggling attacks when httpd is deployed behind a reverse proxy, load balancer, or CDN that uses a different Content-Length resolution strategy (e.g., "last-wins" instead of "first-wins"). Successful exploitation can lead to:
You are affected if:
You are NOT affected if:
RFC Violation:
RFC 9112 Section 6.3, Point 5 requires servers to reject requests with multiple Content-Length headers having different values with a 400 Bad Request response.
CWE Classification:
CAPEC Classification:
Workarounds
Configure frontend proxy to reject duplicate Content-Length headers (recommended)
Disable HTTP keep-alive on httpd
{keep_alive, false}to httpd configurationDeploy Web Application Firewall (WAF)
Affected/Unaffected Versions
A version larger than or equal to one of the listed patched versions is unaffected; otherwise, a version that satisfies an expression listed under affected versions is affected, and if it does not, it is unaffected.
The documentation of the new OTP version scheme describes how versions should be compared. Note that versions used prior to OTP 17.0, when the new OTP version scheme was introduced, are never listed since it is not well defined how to compare those versions.
In the case of this vulnerability, versions prior to OTP 17.0 are likely also affected.
Credits
Thanks to Luigino Camastra (LuiginoC) for finding and responsibly disclosing this vulnerability to the Erlang/OTP project.