Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker controls or influences target URL
-
DeliveryGun client opens HTTP/1.1 connection
-
ExploitServer returns unsolicited 101 Switching Protocols
-
Installhandle_inform/8 switches connection to gun_raw
-
C2Server streams unbounded bytes with no flow control
-
ExecuteOwner mailbox fills with gun_data messages
-
ImpactBEAM VM exhausts memory and crashes
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Workflow enforcement
|
| Exploitation Conditions | Exploitation requires that a gun client (versions 2.0.0 through 2.3.x) opens an HTTP/1.1 connection to a server the attacker can control or has compromised, and that the application does not pin protocols to HTTP/2 only - no authentication, user interaction, or special client configuration is needed beyond making a single HTTP/1.1 request. The attacker must be able to choose or influence the destination host (e.g. via SSRF, webhook URLs, federation peers, redirect chains) or be in a man-in-the-middle position on a non-TLS or improperly validated TLS connection. Exploitation is limited to availability impact on the client process and the BEAM VM hosting it - there is no confidentiality or integrity impact per the CVSS vector (VC:N/VI:N/VA:H) - and connections negotiated over HTTP/2 are not affected because the vulnerable code path lives in gun_http (HTTP/1.1) only. |
| Impact | CVSS 4.0 vector AV:N/AC:L/AT:N/PR:N/UI:N with VA:H and VC:N/VI:N correctly characterises this as a pure, easily reachable availability issue - any code path that uses gun to talk to an untrusted or attacker-controllable HTTP/1.1 endpoint is exposed, with no authentication, user interaction, or special attack requirements on the client side. There is no EPSS, KEV, or POC signal in the supplied intelligence, so this is not confirmed actively exploited and no public exploit identified at time of analysis; however, the patch diff itself is a near-blueprint for a working trigger (send any HTTP/1.1 response whose status line is 101 plus a syntactically valid Upgrade header), so weaponisation cost is very low. The real-world priority therefore depends almost entirely on deployment shape: services that fan out to arbitrary user-supplied URLs (webhooks, SSRF-style proxies, link previewers, federation clients) should treat this as a high-priority patch, while services that only call a small set of trusted internal hosts over gun face materially lower risk. SSVC inputs are not provided in the intelligence bundle, and the CWE-841 mapping is consistent with the code evidence. |
| Exploit ScenarioDerived | An attacker lures a gun-based Erlang service into making any HTTP/1.1 request to a host they control - for example via an SSRF entry point, a webhook callback URL, or a user-supplied federation peer - and the malicious server responds to the very first request with HTTP/1.1 101 Switching Protocols plus a syntactically valid Upgrade header. Gun emits a gun_upgrade message, switches to gun_raw with no flow control, and the server then streams arbitrary bytes as fast as the socket allows, filling the owner process mailbox with gun_data messages until the BEAM node exhausts memory and crashes. No public exploit identified at time of analysis, but the patch diff effectively documents the trigger. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 08, 2026
Denial-of-service in the Erlang HTTP client library Ninenines gun (versions 2.0.0 through 2.3.x) lets a malicious or compromised HTTP/1.1 server force any gun client into raw protocol mode by returning an unsolicited 101 Switching Protocols response, after which the server can flood the client owner process with unbounded gun_data messages and exhaust BEAM VM memory. No public exploit identified at time of analysis, but the fix is trivial and the issue is reachable from any plain HTTP/1.1 request to an attacker-controlled host. CVSS 4.0 8.7 reflects the unauthenticated, network-reachable, high-availability-only impact.
RemediationAI
Vendor-released patch: upgrade gun to 2.4.0 or later, which incorporates upstream commit 5b48068c29ce5e112cb149b5857c7d4dc319a81b that adds the is_expected_upgrade_response/2 check; rebuild and redeploy any release that vendored or statically linked an older gun. Where an immediate upgrade is not feasible, restrict gun-based outbound HTTP/1.1 traffic to a known allowlist of trusted hosts (eliminating the malicious-server precondition), or force connections to HTTP/2 by passing protocols => [http2] in gun:open/3 options where the remote endpoint supports it, since the bug is in the HTTP/1.1 state machine only; both workarounds reduce attack surface but break legitimate WebSocket/h2c upgrades and any HTTP/1.1-only integrations. As a containment measure, run gun client owner processes under a supervisor with memory limits or a max_heap_size so a flood crashes only the owner rather than the BEAM VM, accepting that legitimate large streamed responses may also be terminated. Track the vendor advisory at https://cna.erlef.org/cves/CVE-2026-43974.html and the fix commit at https://github.com/ninenines/gun/commit/5b48068c29ce5e112cb149b5857c7d4dc319a81b.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Gun is a widely used Erlang/OTP HTTP/1.1, HTTP/2 and WebSocket client maintained by Loïc Hoguin (ninenines), commonly embedded in BEAM-based services to make outbound HTTP calls. The bug is a CWE-841 (Improper Enforcement of Behavioral Workflow) flaw in gun_http:handle_inform/8: per RFC 7230 a 101 Switching Protocols response is only valid in reply to a request that itself sent Upgrade and Connection: upgrade headers, but the pre-patch code validated only that the server's Upgrade header parsed correctly and that the stream reference was a plain reference(). Any 101 therefore dispatched a {gun_upgrade,...} message to the owner and switched the connection to gun_raw, which runs with flow=infinity and re-arms socket active mode after every packet, removing all backpressure between the socket and the owner mailbox. The vendor commit 5b48068 introduces an upgrade field on the #stream{} record populated from the outbound request's Connection/Upgrade headers and a new is_expected_upgrade_response/2 check that rejects any 101 the client did not solicit, replying with {gun_error, protocol_error} and closing the connection.
Know when Gun gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
Primary rating from Vendor (EEF) · only source for this CVE.
CVSS VectorVendor: EEF
Lifecycle Timeline
2DescriptionCVE.org
Unexpected Status Code or Return Value vulnerability in ninenines gun (gun_http module) allows a malicious HTTP server to force the client into raw protocol mode via an unsolicited 101 Switching Protocols response.
In gun_http:handle_inform/8, when a 101 Switching Protocols response is received over HTTP/1.1, the function verifies only that the Upgrade header is syntactically valid and that the stream reference is a plain reference(). It does not check whether the client ever sent an Upgrade or Connection: upgrade header on the corresponding request. Because this check is absent, any 101 response (solicited or not) causes gun to dispatch a gun_upgrade message to the caller and transition the entire connection to raw protocol mode.
A malicious or compromised HTTP server can send an unsolicited 101 response to any HTTP/1.1 request, causing the gun client to abandon HTTP framing for that connection. Once in raw mode, gun_raw applies no flow control (flow=infinity) and re-arms socket active mode after every received packet, so the server can flood the client with arbitrary bytes. These are forwarded as unbounded gun_data messages to the owner process, exhausting its mailbox and BEAM memory, ultimately crashing the VM.
This issue affects gun: from 2.0.0 before 2.4.0.
Executive ViewAI
The Ninenines gun library, used by Erlang applications to handle HTTP communications, contains a vulnerability in versions 2.0.0-2.3.x that allows attackers to remotely crash services through a single HTTP response. Organizations relying on Erlang-based services should treat this as a priority outage risk, particularly if those services communicate with external or partially-trusted HTTP endpoints.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Memory exhaustion denial of service in Ninenines Gun (Erlang HTTP client) versions 1.0.0 through 2.3.x allows a maliciou
Cross-origin cookie injection in ninenines gun (versions 2.0.0 through 2.3.x) allows a malicious or compromised HTTP/2 s
EUVD-2026-35072
GHSA-2j82-37xg-f9wp
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB