Skip to main content

Ninenines gun EUVDEUVD-2026-35072

| CVE-2026-43974 HIGH
Improper Enforcement of Behavioral Workflow (CWE-841)
2026-06-08 EEF GHSA-2j82-37xg-f9wp
8.7
CVSS 4.0 · Vendor: EEF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker controls or influences target URL
  2. Delivery
    Gun client opens HTTP/1.1 connection
  3. Exploit
    Server returns unsolicited 101 Switching Protocols
  4. Install
    handle_inform/8 switches connection to gun_raw
  5. C2
    Server streams unbounded bytes with no flow control
  6. Execute
    Owner mailbox fills with gun_data messages
  7. Impact
    BEAM 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

gun 2.0.0 <2.4.0
gun a3c2edbb8c807717e2f10520c6cf1e77a62eab2e <5b48068c29ce5e112cb149b5857c7d4dc319a81b

Affected Packages

euvd gun fix: 2.4.0

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

Vendor (EEF) PRIMARY 8.7 HIGH
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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
Jun 08, 2026 - 15:37 NVD
8.7 (HIGH)
CVE Published
Jun 08, 2026 - 14:12 nvd
UNKNOWN (no severity yet)

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 88% exploitable
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA CIRCL GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy