CVE-2026-49753
JSON

6.3medium

HTTP response smuggling in Mint HTTP/1 client via lenient Content-Length parsing

Severity
6.3medium CVSS:4.0 by EEF
Exploit likelihood
0.52% (higher than 38% of CVEs)
Published
Last changed
Assigned by
EEF
Also known as
GHSA-mjqx-c6f6-7rc2EEF-CVE-2026-49753

Description

Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling') vulnerability in elixir-mint Mint allows attacker-controlled HTTP/1 servers to desynchronise response framing on shared connections. Mint's HTTP/1 Content-Length parser, Mint.HTTP1.Parse.content_length_header/1 in lib/mint/http1/parse.ex, parses the header value with Integer.parse/1, which accepts an optional + or - sign prefix. The length >= 0 guard rejects negatives, but inputs such as +0 or +123 are returned as valid lengths. RFC 7230 specifies Content-Length = 1*DIGIT, with no sign character permitted. A fronting proxy or load balancer that strictly enforces the grammar will reject or reframe a header like Content-Length: +0, while Mint silently treats it as zero. When Mint reuses the socket (keep-alive, pipelining, or any pooled connection shared across requesters), the parser disagreement is a response-smuggling primitive: the proxy delimits the body one way, Mint another, and bytes from one response get attributed to the next. Where the same Mint connection is shared across trust boundaries, an attacker-controlled upstream can leak bytes into a different consumer's response stream. This issue affects mint: from 0.1.0 before 1.9.0.

Affected

Product or packageVersionsReported by
mintfrom 0.1.0 before 1.9.0CVE List
elixir-mint/mintfrom 65e0e86d799a6d3b08e4372fccdd9747535e0dd6 before 47e48027480228e4e32a0b4df39db497b4804921CVE List
mint (Hex)before 1.9.0, from 0.1.0 before 1.9.0GitHub Advisory Database, Erlang Ecosystem Foundation
https://github.com/elixir-mint/mintfrom 65e0e86d799a6d3b08e4372fccdd9747535e0dd6 before 47e48027480228e4e32a0b4df39db497b4804921Erlang Ecosystem Foundation

All scores

EEF6.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N
Erlang Ecosystem FoundationNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N

Classification

CWE-444

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling') vulnerability in elixir-mint Mint allows attacker-controlled HTTP/1 servers to desynchronise response framing on shared connections. Mint's HTTP/1 Content-Length parser, Mint.HTTP1.Parse.content_length_header/1 in lib/mint/http1/parse.ex, parses the header value with Integer.parse/1, which accepts an optional + or - sign prefix. The length >= 0 guard rejects negatives, but inputs such as +0 or +123 are returned as valid lengths. RFC 7230 specifies Content-Length = 1*DIGIT, with no sign character permitted. A fronting proxy or load balancer that strictly enforces the grammar will reject or reframe a header like Content-Length: +0, while Mint silently treats it as zero. When Mint reuses the socket (keep-alive, pipelining, or any pooled connection shared across requesters), the parser disagreement is a response-smuggling primitive: the proxy delimits the body one way, Mint another, and bytes from one response get attributed to the next. Where the same Mint connection is shared across trust boundaries, an attacker-controlled upstream can leak bytes into a different consumer's response stream. This issue affects mint: from 0.1.0 before 1.9.0.

GitHub Advisory Database
Summary

Mint's HTTP/1 client accepts Content-Length header values with a leading + sign (e.g. +0, +123), which RFC 7230 forbids (Content-Length = 1*DIGIT). On a connection shared with a strict fronting proxy or load balancer, this parser disagreement is a response-smuggling primitive: the proxy frames the body one way, Mint frames it another, and bytes meant for one response leak into the next consumer's response stream.

Details

'Elixir.Mint.HTTP1.Parse':content_length_header/1 in lib/mint/http1/parse.ex parses the header value with Integer.parse/1. By design, Integer.parse/1 accepts an optional + or - sign prefix. The length >= 0 guard rules out negatives, but inputs such as "+0", "+123", or "+1" pass through and are returned as valid lengths.

A strict proxy or load balancer rejects or reframes Content-Length: +0\r\n, while Mint silently treats it as 0. When Mint reuses the socket (keep-alive, pipelining, or any pooled connection) and the connection is shared with a proxy that frames the same bytes differently, trailing bytes the proxy attributes to response N are attributed by Mint to response N+1. Across trust boundaries (shared pools, multi-tenant fronting) this enables response smuggling.

PoC
  1. Stand up a raw TCP server that returns HTTP/1.1 200 OK\r\nContent-Length: +0\r\nConnection: keep-alive\r\n\r\n<smuggled bytes>.
  2. Connect a Mint HTTP/1 client to the server and issue a request.
  3. Observe that Mint reports the response as status 200 with Content-Length: "+0" and an empty body, leaving the smuggled bytes sitting in the socket buffer for the next response.
Impact

Response-smuggling / request-response desync primitive in Mint's HTTP/1 client parser. Anyone using Mint (directly or via Finch, Tesla's Mint adapter, Req, etc.) to talk through a shared or pooled connection where a fronting proxy enforces RFC 7230 strictly while Mint does not is exposed. The attacker is the response producer (a malicious or compromised upstream, or anything that can inject bytes into a shared origin response); exploitation into a cross-request data leak additionally requires the deployment to share a Mint connection across trust boundaries.

Resources

Erlang Ecosystem Foundation

Summary

Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling') vulnerability in elixir-mint Mint allows attacker-controlled HTTP/1 servers to desynchronise response framing on shared connections.

Mint's HTTP/1 Content-Length parser, Mint.HTTP1.Parse.content_length_header/1 in lib/mint/http1/parse.ex, parses the header value with Integer.parse/1, which accepts an optional + or - sign prefix. The length >= 0 guard rejects negatives, but inputs such as +0 or +123 are returned as valid lengths. RFC 7230 specifies Content-Length = 1*DIGIT, with no sign character permitted.

A fronting proxy or load balancer that strictly enforces the grammar will reject or reframe a header like Content-Length: +0, while Mint silently treats it as zero. When Mint reuses the socket (keep-alive, pipelining, or any pooled connection shared across requesters), the parser disagreement is a response-smuggling primitive: the proxy delimits the body one way, Mint another, and bytes from one response get attributed to the next. Where the same Mint connection is shared across trust boundaries, an attacker-controlled upstream can leak bytes into a different consumer's response stream.

This issue affects mint: from 0.1.0 before 1.9.0.

NVD (es)

Una vulnerabilidad de 'Interpretación inconsistente de solicitudes HTTP' ('Contrabando de Solicitudes/Respuestas HTTP') en elixir-mint Mint permite a servidores HTTP/1 controlados por el atacante desincronizar el enmarcado de respuestas en conexiones compartidas. El analizador Content-Length HTTP/1 de Mint, Mint.HTTP1.Parse.content_length_header/1 en lib/mint/http1/parse.ex, analiza el valor del encabezado con Integer.parse/1, que acepta un prefijo de signo + o - opcional. La guarda length >= 0 rechaza los negativos, pero entradas como +0 o +123 se devuelven como longitudes válidas. RFC 7230 especifica Content-Length = 1DIGIT, sin permitir ningún carácter de signo. Un proxy frontal o balanceador de carga que aplica estrictamente la gramática rechazará o reenmarcará un encabezado como Content-Length: +0, mientras que Mint lo trata silenciosamente como cero. Cuando Mint reutiliza el socket (keep-alive, pipelining, o cualquier conexión agrupada compartida entre solicitantes), el desacuerdo del analizador es una primitiva de contrabando de respuestas: el proxy delimita el cuerpo de una manera, Mint de otra, y los bytes de una respuesta se atribuyen a la siguiente. Donde la misma conexión de Mint se comparte a través de límites de confianza, un upstream controlado por el atacante puede filtrar bytes en el flujo de respuesta de un consumidor diferente. Este problema afecta a mint: desde 0.1.0 antes de 1.9.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-49753 changed 2026-11-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-mjqx-c6f6-7rc2 changed 2026-07-09CC-BY-4.0
Erlang Ecosystem FoundationEEF-CVE-2026-49753 changed 2026-11-25CC-BY-4.0
NVDCVE-2026-49753 changed 2026-11-20Public domain