CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-49753

CVE-2026-49753: HTTP Request/Response Smuggling via Inconsistent Content-Length Parsing in Elixir Mint Client

Amit Schendel
Amit Schendel
Senior Security Researcher

Jul 10, 2026·6 min read·29 visits

Executive Summary (TL;DR)

Elixir Mint's parser accepted sign-prefixed Content-Length values (like '+100') due to using Integer.parse/1. Intermediaries strictly enforcing RFC 7230/9110 reject or reframe these headers, enabling HTTP response smuggling and connection poisoning.

An Inconsistent Interpretation of HTTP Requests (HTTP Request/Response Smuggling) vulnerability in the Elixir Mint HTTP client allows attacker-controlled HTTP/1 servers to desynchronize response framing on shared connections due to over-lenient parsing of sign-prefixed Content-Length headers.

Vulnerability Overview

The Elixir Mint client (elixir-mint/mint) is a low-level, process-less HTTP client designed for high-performance network communication in Erlang and Elixir environments. It is frequently employed in applications that require robust connection pooling, proxy support, and pipeline performance.

In HTTP/1.1 communication, parsing boundaries are defined strictly by the Content-Length or Transfer-Encoding headers. If an HTTP client and an intermediary reverse proxy disagree on the length of a response, they will mismatch where one HTTP response ends and the subsequent response begins on a shared, persistent socket.

This vulnerability arises because Mint's HTTP/1 parser accepts sign-prefixed values (such as +100 or +0) in the Content-Length header. Because strict reverse proxies and load balancers drop or reject such headers, this parser differential creates an exploitation pathway for HTTP request and response smuggling.

Root Cause Analysis

The root cause of this vulnerability lies in the use of Elixir's native Integer.parse/1 function within the Mint.HTTP1.Parse.content_length_header/1 function.

Elixir's Integer.parse/1 utility is designed for general-purpose string-to-integer conversion. It parses a leading sign prefix, meaning strings like +123 are successfully parsed as the integer 123, and -10 is parsed as -10. Mint attempted to validate this value by checking if the resulting parsed integer was non-negative (length >= 0), which successfully blocked negative lengths but allowed positive-sign prefixes to pass.

Under RFC 7230 (Section 3.3.2) and RFC 9110 (Section 8.6), the standard HTTP/1.1 specification defines the grammar of Content-Length using the following ABNF rule:

Content-Length = 1*DIGIT

This specification strictly restricts the characters in the header to ASCII digits (0-9). It explicitly forbids any sign prefix, including + or -. When an upstream server under an attacker's control responds to Mint with Content-Length: +100, Mint processes this as a valid message body of 100 bytes. However, an intermediary proxy implementing strict RFC validation will flag +100 as invalid, and may treat the response body as having a length of zero or ignore the message framing altogether. This difference in implementation creates a classic response-smuggling condition.

Code-Level Analysis and Historical Context

The vulnerable logic has existed in Mint's ancestral codebase since 2017. It was originally introduced in the legacy xhttp client library in commit 65e0e86d799a6d3b08e4372fccdd9747535e0dd6 before being migrated into Mint's lib/mint/http1/parse.ex file.

Below is the vulnerable implementation in Mint before the fix:

def content_length_header(string) do
  # String.trim_trailing/1 is executed, then Integer.parse/1 converts the string
  case Integer.parse(String.trim_trailing(string)) do
    {length, ""} when length >= 0 -> {:ok, length}
    _other -> {:error, {:invalid_content_length_header, string}}
  end
end

To remediate this parsing flaw, the maintainers modified the header processor in commit 47e48027480228e4e32a0b4df39db497b4804921 to validate the string before parsing it. The revised implementation uses a custom pattern-matching function only_digits?/1 to ensure that only standard ASCII digits are passed to String.to_integer/1:

def content_length_header(string) do
  trimmed = String.trim_trailing(string)
 
  # Strictly enforce that the trimmed string contains only ASCII digits
  if only_digits?(trimmed) do
    {:ok, String.to_integer(trimmed)}
  else
    {:error, {:invalid_content_length_header, string}}
  end
end
 
# Helper function to recursively check for strict ASCII digits (0x30 to 0x39)
defp only_digits?(<<char>>) when is_digit(char), do: true
defp only_digits?(<<char, rest::binary>>) when is_digit(char), do: only_digits?(rest)
defp only_digits?(_other), do: false

This change successfully eliminates the use of Integer.parse/1 for input validation and blocks sign prefixes, hexadecimal indicators, and spaces.

Exploitation and Attack Scenarios

Exploitation relies on a shared connection architecture where the Mint HTTP client connects to an untrusted upstream server through an intermediary proxy. A typical scenario involves an application hosting a webhook service, an SSRF-vulnerable interface, or a reverse proxy utilizing the Mint client.

An attacker controls the destination server and triggers an outbound request from the Mint client. The attacker's server then responds with a payload designed to split the connection buffer:

HTTP/1.1 200 OK
Content-Length: +50
Connection: keep-alive
 
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 19
 
<script>alert(1)</script>

The proxy, receiving this sequence, rejects +50 as an invalid Content-Length. It processes the header as 0 or treats the response as terminated. It then considers the trailing bytes containing the second HTTP header as the start of a pipelined HTTP response or leaves them in the pipeline. Mint, on the other hand, reads exactly 50 bytes of response body and completes its cycle.

When a victim subsequently requests a resource over the same pooled connection, the proxy matches the victim's request with the remaining smuggled bytes left in the socket stream. The victim is then served the smuggled response containing the attacker's script payload, resulting in cross-site scripting (XSS), credential leakage, or session hijacking.

Security Patch Assessment and Potential Bypass Variants

A detailed security analysis of the patch reveals a subtle edge-case behavior that could potentially be targeted in specialized environments. The patch executes trimmed = String.trim_trailing(string) prior to performing the only_digits?/1 check.

In Elixir, String.trim_trailing/1 is Unicode-aware. It strips not only standard ASCII carriage returns, line feeds, and horizontal tabs, but also any Unicode-defined trailing whitespace character. This includes characters such as the No-Break Space (\u00A0), Ogham Space Mark (\u1680), or En Quad (\u2000).

If an attacker provides a header containing a trailing Unicode space character:

Content-Length: 100\u00A0

Mint's Unicode-aware trimmer strips the trailing \u00A0, leaving the string "100". This passes the only_digits?/1 check, and Mint processes it as a valid content length of 100 bytes. However, many strict intermediary proxies and load balancers do not recognize Unicode spaces as valid Optional Whitespace (OWS) under RFC rules. Standard proxies recognize only ASCII Space (0x20) and Horizontal Tab (0x09).

Such a proxy will view the non-ASCII character as an invalid character, causing it to ignore the header or close the connection. This discrepancy maintains a minor parser differential that could allow for response smuggling in environments where the intermediary enforces strict ASCII-only OWS validation while Mint performs Unicode-aware trimming. To completely close this attack vector, the parser should be hardened to strip only strict ASCII whitespace characters.

Mitigation, Detection, and Defense-in-Depth

The primary remediation for this vulnerability is to upgrade the mint dependency to version 1.9.0 or higher. Developers should update their mix.exs configuration file and run mix deps.get to fetch the patched library.

For environments where immediate upgrades are not possible, several defense-in-depth measures can mitigate the risk. Network administrators should configure Web Application Firewalls (WAF) or Reverse Proxies to drop incoming responses from upstream servers that contain non-numeric characters inside the Content-Length header.

Disabling connection reuse (such as turning off Keep-Alive) or isolating connection pools by user session prevents the multiplexing of untrusted upstream connections with legitimate client sessions, removing the primary vector required to execute smuggling attacks.

Official Patches

elixir-mintFix commit implementing strict digit validation on Content-Length header.

Fix Analysis (2)

Technical Appendix

CVSS Score
6.3/ 10
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N
EPSS Probability
0.30%
Top 78% most exploited

Affected Systems

elixir-mint/mint

Affected Versions Detail

Product
Affected Versions
Fixed Version
mint
elixir-mint
>= 0.1.0, < 1.9.01.9.0
AttributeDetail
CWE IDCWE-444
Attack VectorNetwork
CVSS v4.06.3
EPSS Score0.00301
ImpactHTTP Request/Response Smuggling
Exploit StatusNone
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1071.001Application Layer Protocol: Web Protocols
Command and Control
CWE-444
Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')

The program does not properly parse or interpret HTTP requests, which can lead to HTTP request or response smuggling.

Vulnerability Timeline

Vulnerable parser logic introduced in xhttp repository
2017-11-01
Patch committed to elixir-mint/mint repository (commit 47e4802)
2026-06-02
GitHub Security Advisory GHSA-mjqx-c6f6-7rc2 published
2026-06-02
CVE-2026-49753 assigned and registered in NVD
2026-06-02

References & Sources

  • [1]GHSA-mjqx-c6f6-7rc2 Security Advisory
  • [2]Erlang Ecosystem Foundation CVE Entry
  • [3]OSV Database Entry

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•30 minutes ago•CVE-2026-107716
7.3

CVE-2026-107716: Path Traversal and Link Following in banks DirectoryPromptRegistry

Improper pathname limitation and link resolution (CWE-22 and CWE-59) in the banks library prior to version 2.5.1 allow local attackers to read or write arbitrary files via crafted symbolic links in the prompt directory registry.

Amit Schendel
Amit Schendel
2 views•7 min read
•about 1 hour ago•CVE-2026-107726
9.3

CVE-2026-107726: Unrestricted Deserialization in Hazelcast Zero Config Compact Serialization

Improper validation of dynamic class resolution within Hazelcast's Zero Config Compact Serialization allows unauthenticated clients to trigger reflective class instantiation. This flaw can be exploited to read arbitrary JVM heap or off-heap memory, crash cluster nodes, or achieve arbitrary code execution under specific classpath conditions. This issue is resolved in Hazelcast versions 5.4.5, 5.5.10, 5.6.1, and 5.7.0.

Alon Barad
Alon Barad
4 views•6 min read
•about 3 hours ago•CVE-2026-107719
4.2

CVE-2026-107719: Session Expiration Bypass in fast-jwt via Verifier Cache

An authentication bypass vulnerability in NearForm's fast-jwt before version 6.3.4 allows attackers to replay expired tokens due to an error in the verifier's cache expiration logic. When caching is enabled, the cache TTL defaults to 10 minutes instead of honoring the token's exp claim if the token lacks an iat claim.

Alon Barad
Alon Barad
4 views•7 min read
•about 4 hours ago•CVE-2026-61427
7.3

CVE-2026-61427: Authentication Bypass and Unvalidated Tool Execution in PraisonAI MCP HTTP-Stream Server

CVE-2026-61427 is a critical authentication bypass and improper input validation vulnerability within the Model Context Protocol (MCP) HTTP-stream server of PraisonAI. In versions prior to 4.6.78, the server lacks authentication by default and forwards client messages directly to Python tool handlers without input validation. When bound to non-localhost interfaces, this permits unauthenticated remote attackers to perform unauthorized administrative operations and execute tools.

Alon Barad
Alon Barad
8 views•4 min read
•about 5 hours ago•CVE-2026-107387
6.2

CVE-2026-107387: Uncontrolled Memory Allocation (OOM) in music-metadata APEv2 Parser

CVE-2026-107387 is a high-impact uncontrolled memory allocation vulnerability in music-metadata, a widely used Node.js metadata parser. The flaw occurs in the APEv2 tag parser, where the library reads an attacker-controlled 32-bit integer indicating the tag size and immediately requests a corresponding heap buffer reservation. Because this allocation occurs before validating if the input stream actually contains those bytes, an attacker can supply a minuscule audio file to trigger large, disproportionate allocations, resulting in heap exhaustion and an uncatchable process-wide Out of Memory (OOM) crash.

Amit Schendel
Amit Schendel
8 views•5 min read
•about 6 hours ago•CVE-2026-107391
6.2

CVE-2026-107391: Synchronous Infinite Loop and Memory Exhaustion in music-metadata MP4 Parser

An input validation vulnerability exists in music-metadata versions prior to 11.16.0, where parsing a crafted MP4 file containing a sample-description (stsd) box with a zero-value size entry causes a synchronous infinite loop and memory exhaustion, resulting in complete Denial of Service.

Alon Barad
Alon Barad
11 views•7 min read