Am I affected?

type your mint version to check

Description

Improper Neutralization of CRLF Sequences ('CRLF Injection') vulnerability in elixir-mint Mint allows HTTP Request Splitting and HTTP Request Smuggling.

In lib/mint/http1/request.ex, the encode_request_line/2 function splices the caller-supplied method and target arguments directly into the HTTP/1 request line without any character validation: [method, ?\s, target, " HTTP/1.1\r\n"]. An application that forwards attacker-controlled input as the HTTP method or target to Mint.HTTP.request/5 is therefore exposed to request-line CRLF injection: the attacker can terminate the request line early, inject arbitrary headers, and smuggle an entirely separate pipelined HTTP request onto the same TCP connection.

Mint 1.7.0 introduced validate_request_target/2, which rejects CRLF and other control characters in the target by default and closes the path/query vector unless the caller opts out via skip_target_validation: true. The method field remains unvalidated, so the method-based injection is exploitable under the default Mint configuration on all versions.

This issue affects mint: from 0.1.0 before 1.9.0.

Weaknesses & attack patterns

Weakness

CWE-93 · Improper Neutralization of CRLF Sequences in catalog → MITRE ↗

Attack patterns

CAPEC-33 · HTTP Request Smuggling MITRE ↗
CAPEC-105 · HTTP Request Splitting MITRE ↗

Affected — Hex / mint Hex.pm ↗ Repository ↗

≥ 0.1.0 < 1.9.0 affected
every other version: unaffected
cpe cpe:2.3:a:elixir-mint:mint:*:*:*:*:*:*:*:*
version type semver
modules · source files · routines
modules 'Elixir.Mint.HTTP1.Request'
source files lib/mint/http1/request.ex
routines 'Elixir.Mint.HTTP1.Request':encode_request_line/2

Affected — GitHub / elixir-mint/mint Repository ↗

≥ 8db1acf < fad0914 affected
every other version: unaffected
cpe cpe:2.3:a:elixir-mint:mint:*:*:*:*:*:*:*:*
version type git
modules · source files · routines
modules 'Elixir.Mint.HTTP1.Request'
source files lib/mint/http1/request.ex
routines 'Elixir.Mint.HTTP1.Request':encode_request_line/2

References

Credits

Peter Ullrich Finder
Jonatan Männchen / EEF Analyst
Eric Meadows-Jönsson Remediation developer

CVSS breakdown

CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N

Exploitability

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None

Vulnerable System

Confidentiality
None
Integrity
Low
Availability
None

Subsequent Systems

Confidentiality
None
Integrity
Low
Availability
None
« All CVEs