Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Lifecycle Timeline
4DescriptionCVE.org
Uncontrolled Resource Consumption vulnerability in ninenines gun (gun_http module) allows a malicious server to exhaust client memory via unbounded HTTP/1.1 response buffering.
In gun_http:handle/5, three clauses accumulate incoming TCP data into the connection's buffer field using binary concatenation with no upper-bound check: the head clause appends data until the \r\n\r\n header terminator is found; the body_chunked clause appends data whenever cow_http_te:stream_chunked/2 returns a more result indicating an incomplete chunk boundary; and the body_trailer clause appends data until the trailing \r\n\r\n is found. In each case, when the expected terminator never arrives, the enlarged binary is stored back into state and the process waits for more data, with no configurable or hard-coded ceiling on buffer size.
A malicious or compromised server can exploit this by sending a partial response that never completes. For example, a response may begin with HTTP/1.1 200 OK\r\nX-Pad: followed by an unbounded stream of arbitrary bytes, never sending the header terminator. The gun connection process will continuously append the incoming data to its buffer, causing unbounded heap growth. Because BEAM imposes no per-process heap limit by default, a single malicious connection can exhaust all available memory on the node, causing a node-wide out-of-memory crash.
This issue affects gun: from 1.0.0 before 2.4.0.
AnalysisAI
Memory exhaustion denial of service in Ninenines Gun (Erlang HTTP client) versions 1.0.0 through 2.3.x allows a malicious or compromised HTTP/1.1 server to crash the entire BEAM node by sending an unterminated response. The gun_http module accumulates incoming bytes into a per-connection buffer without any size ceiling, and since BEAM imposes no default per-process heap limit, a single connection can consume all node memory. No public exploit identified at time of analysis, though the upstream patch and accompanying test cases publicly demonstrate the triggering server behavior.
Technical ContextAI
Gun is a widely used Erlang/OTP HTTP/1.1, HTTP/2, and WebSocket client maintained by Ninenines (Loïc Hoguin), commonly embedded in Erlang and Elixir services for outbound HTTP. The flaw is a classic CWE-770 (Allocation of Resources Without Limits or Throttling): in src/gun_http.erl, three handle/5 clauses - the head clause (waiting for the \r\n\r\n header terminator), the body_chunked clause (when cow_http_te:stream_chunked/2 returns more), and the body_trailer clause (waiting for the trailing \r\n\r\n) - perform binary concatenation into the connection state's buffer field with no bounds check before re-entering the receive loop. Because the Erlang BEAM virtual machine does not impose a default per-process heap limit, that unbounded binary growth translates directly into node-wide memory pressure. The CPE cpe:2.3:a:ninenines:gun:*:*:*:*:*:*:*:* covers all gun releases up to the fix.
RemediationAI
Vendor-released patch: upgrade to gun 2.4.0 or later, which adds the new http_opts() fields max_header_block_size (default 100000 bytes) and max_trailer_block_size (default 10000 bytes); when either soft limit is exceeded gun closes the connection with a {connection_error, limit_reached, ...} error rather than continuing to buffer. The fix commit is https://github.com/ninenines/gun/commit/f3e7e0568b3c4cf9fa4bea79d5116e67ce76ad25 and full advisory details are at https://cna.erlef.org/cves/CVE-2026-43973.html. If upgrading immediately is not possible, compensating controls include restricting outbound HTTP destinations to a trusted allowlist of origins (eliminates attacker-controlled servers but breaks any user-driven URL fetching), terminating long-lived or slow gun connections with an application-level idle/total-time watchdog (adds latency on legitimate slow servers), and as a last resort applying a per-process heap limit via spawn_opt's max_heap_size on the gun connection process so the offending process is killed before exhausting the node (kills the connection abruptly and may interfere with large legitimate responses if set too low).
Denial-of-service in the Erlang HTTP client library Ninenines gun (versions 2.0.0 through 2.3.x) lets a malicious or com
Cross-origin cookie injection in ninenines gun (versions 2.0.0 through 2.3.x) allows a malicious or compromised HTTP/2 s
Same technique Denial Of Service
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-35074
GHSA-r53j-fjj5-mv77