Am I affected?

type your mint version to check

Description

Allocation of Resources Without Limits or Throttling vulnerability in elixir-mint Mint allows attacker-controlled HTTP/2 servers to exhaust memory in a Mint client (HTTP/2 CONTINUATION flood).

When Mint's HTTP/2 receive path observes a HEADERS frame without the END_HEADERS flag, the unparsed header-block fragment is parked in conn.headers_being_processed, and every subsequent CONTINUATION frame on that stream is appended to the accumulator. Nothing in the receive path caps the accumulator: there is no per-stream size limit, no CONTINUATION frame-count limit, and max_header_list_size is only enforced on outgoing requests, never on inbound header blocks (its default is :infinity).

A malicious or compromised HTTP/2 server can stream an endless sequence of CONTINUATION frames (each up to the peer-advertised SETTINGS_MAX_FRAME_SIZE) and drive the client's iolist to arbitrary size, causing memory exhaustion and BEAM process death. A single connection to an attacker-controlled HTTP/2 endpoint is sufficient.

This issue affects mint: from 0.1.0 before 1.9.0.

Weaknesses & attack patterns

Weakness

CWE-770 · Allocation of Resources Without Limits or Throttling in catalog → MITRE ↗

Attack patterns

CAPEC-130 · Excessive Allocation 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:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Mint.HTTP2'
source files lib/mint/http2.ex
routines 'Elixir.Mint.HTTP2':handle_continuation/3 · 'Elixir.Mint.HTTP2':handle_headers/3

Affected — GitHub / elixir-mint/mint Repository ↗

596ca43 < b662d12 affected
every other version: unaffected
cpe cpe:2.3:a:elixir-mint:mint:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Mint.HTTP2'
source files lib/mint/http2.ex
routines 'Elixir.Mint.HTTP2':handle_continuation/3 · 'Elixir.Mint.HTTP2':handle_headers/3

Workarounds

Restrict Mint to HTTP/1 on connections to untrusted servers by passing protocols: [:http1] to 'Elixir.Mint.HTTP':connect/4. This avoids the vulnerable HTTP/2 receive path entirely, at the cost of losing HTTP/2 for those connections.

References

Credits

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

CVSS breakdown

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