/

CVE-2026-23941

Severity:

CRITICAL RISK

(9.4)

HTTP Request Smuggling in Erlang OTP inets httpd

CVE-2026-23941

Modified

Vulnerability type

Category:

HTTP Request Smuggling

CWE:

CWE-444

Impact:

Request Smuggling and Front-end/Back-end Desynchronization

Severity:

CRITICAL RISK

(9.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Erlang OTP's inets httpd module mishandles HTTP requests containing duplicate Content-Length headers, leading to HTTP Request Smuggling.

When deployed behind common reverse proxies, an attacker can desynchronize the front-end and back-end HTTP streams, allowing hidden requests, cache poisoning, and credential hijacking under certain traffic patterns.

Affected context

This vulnerability arises when Erlang OTP's inets httpd server is used:

  • As an origin server behind a reverse proxy or load balancer (e.g., nginx, Apache httpd, Envoy)
  • Over HTTP/1.1 where message framing relies on Content-Length headers
  • Without an intermediary that normalizes or rejects malformed headers, including duplicates

The risk materializes in deployments where the proxy and inets httpd interpret duplicate Content-Length headers differently, causing them to disagree about request boundaries.

Exploit preconditions

  • Attack surface: HTTP/1.1 interfaces exposed directly or via a reverse proxy to untrusted clients (e.g., internet-facing APIs or web endpoints).
  • Required access: Ability to send crafted HTTP requests to the front-end proxy that are forwarded to an inets httpd backend.
  • Trigger point: A request with multiple Content-Length headers where:
  • The proxy honors the last Content-Length value.
  • The inets backend honors the earliest Content-Length value.
  • Why exploitation is possible: The backend (httpd_request:parse_headers/7) does not reject or normalize duplicate Content-Length headers and violates RFC 9112 Section 6.3. This causes the proxy and backend to parse the request body length differently, leaving attacker-controlled bytes queued to be interpreted as the start of a subsequent request.

Why this happens

The core issue is inconsistent handling of duplicate Content-Length headers between the inets httpd server and common reverse proxies. Inets:

  • Accepts requests with multiple Content-Length headers instead of rejecting them as invalid.
  • Uses the earliest Content-Length value for body parsing, while forward proxies typically use the last value.

This diverging interpretation breaks the assumption that all HTTP intermediaries agree on message boundaries, enabling HTTP Request Smuggling. Abstractly, this maps to CWE-444: Inconsistent Interpretation of HTTP Requests, where two or more HTTP components process the same request differently due to non-compliant parsing and missing normalization of ambiguous or malformed headers.

Potential impact

  • Smuggling of hidden HTTP requests through the proxy to the inets backend
  • Hijacking or piggybacking on other users' connections by injecting requests into their session
  • Cache poisoning or cache deception at the proxy layer, potentially serving attacker-controlled responses to other clients
  • Bypassing authentication, routing, or WAF rules enforced only at the proxy
  • Leveraging desynchronized request streams as a stepping stone to exploit additional backend vulnerabilities

General mitigation guidance

Effective mitigations focus on normalizing HTTP message framing and enforcing strict parsing rules across the stack:

  • Ensure HTTP servers and proxies reject any request with multiple Content-Length headers or any ambiguous combination of Content-Length and Transfer-Encoding.
  • Prefer standard-compliant behavior that treats malformed framing as a hard error, closing the connection rather than attempting to guess intent.
  • Introduce a normalization layer at the edge (e.g., a hardened proxy or gateway) that:
  • Canonicalizes headers.
  • Drops or blocks requests with duplicate or conflicting framing headers.
  • Apply a "single source of truth" policy for request framing: configure components so that only one mechanism (Content-Length or chunked Transfer-Encoding) is accepted at a time.
  • Segment and lock down internal HTTP paths so that high-value endpoints are not directly reachable from general-purpose front-ends.
  • Use least privilege for backend applications so that any smuggled requests have minimized reach and effect.

How teams detect issues like this

Detection typically combines protocol-aware analysis, code review, and behavioral monitoring:

  • Static/code review:
  • Examine HTTP parsing logic (e.g., httpd_request:parse_headers/7) for:
  • Acceptance of duplicate Content-Length headers.
  • Non-compliant handling of conflicting Content-Length / Transfer-Encoding.
  • Use static analysis or linting rules that flag ambiguous header parsing and lack of normalization.
  • Configuration review:
  • Inspect reverse proxy and gateway configurations for:
  • Explicit rules rejecting malformed framing.
  • Consistent parsing policies across all entry points.
  • Dynamic testing:
  • Employ HTTP Request Smuggling test suites in staging (e.g., fuzzers or DAST tools) to send crafted requests with multiple Content-Length headers and observe:
  • Response timing anomalies.
  • Evidence of desynchronization (e.g., responses that combine content from multiple logical requests).
  • Runtime monitoring:
  • Log and alert on:
  • Requests containing duplicate Content-Length or conflicting framing headers.
  • Unusual 4xx/5xx patterns or misaligned request/response pairs that may indicate smuggling attempts.

Sources

SourceLink
cna.erlef.orgcna.erlef.org/cves/CVE-2026-23941.html
github.comgithub.com/erlang/otp/commit/a4b46336fd25aa100ac602eb9a627aaead7eda18
github.comgithub.com/erlang/otp/commit/a761d391d8d08316cbd7d4a86733ba932b73c45b
github.comgithub.com/erlang/otp/commit/e775a332f623851385ab6ddb866d9b150612ddf6
github.comgithub.com/erlang/otp/security/advisories/GHSA-w4jc-9wpv-pqh7
osv.devosv.dev/vulnerability/EEF-CVE-2026-23941
erlang.orgerlang.org/doc/system/versions.html#order-of-versions

Frequently asked

questions

Yes. An attacker who can send crafted HTTP requests to an affected deployment (typically via the internet or another untrusted network) can attempt to smuggle requests through the proxy to the inets backend, without needing local access.

Generally no. The vulnerability occurs at the HTTP parsing layer, before application-level authentication, so untrusted clients can often trigger it as long as they can reach the front-end proxy that forwards traffic to inets httpd.

The most robust fix is to enforce strict, RFC-compliant parsing across the stack, including:

  • Rejecting any request with multiple Content-Length headers.
  • Rejecting ambiguous or conflicting framing combinations.
  • Normalizing headers at the edge so that all downstream components see a single, consistent view of the request.

Adopt a defense-in-depth strategy for HTTP handling: standardize on compliant parsers, add edge normalization and validation, include Request Smuggling tests in CI/CD pipelines, and regularly review reverse proxy and backend configurations for ambiguous framing behavior. Treat any inconsistency in how intermediaries parse HTTP as a potential vulnerability and resolve it proactively.

Find out what's already
exploitable in your codebase.