Skip to content

EEF-CVE-2026-43974 CVE-2026-43974 GHSA-2j82-37xg-f9wp

gun HTTP/1.1 client accepts unsolicited 101 Switching Protocols response allowing server-driven protocol hijack and OOM

High Hex
Severity
0.0 / 10
High · CVSS 4.0
Exploit chance (EPSS)
0.48%
Chance of exploitation in the next 30 days. Higher than 41.54% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-841 Improper Enforcement of Behavioral Workflow
Fix
2.4.0
Upgrade gun to this version or later

Description

Summary

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.

Affected versions

Hex

PackageVulnerableFixed in
gun
>= 2.0.0, < 2.4.0
2.4.0

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

gun Hex → 2.4.0

mix
{:gun, "~> 2.4.0"} # then: mix deps.update gun

Severity breakdown

CVSS 4.0 0.0

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

Attack vector
Network
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
None
Integrity (vulnerable system)
None
Availability (vulnerable system)
High
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

CWE-841: Improper Enforcement of Behavioral Workflow

The product supports a session in which more than one behavior must be performed by an actor, but it does not properly ensure that the actor performs the behaviors in the required sequence.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
EEF-CVE-2026-43966
HTTP Response Splitting via Non-VCHAR Bytes in cow_http_struct_hd:escape_string/2
Medium Also affects gun
EEF-CVE-2026-43973
gun HTTP/1.1 response buffer has no size limit allowing server-controlled memory exhaustion
High Also affects gun
EEF-CVE-2026-43972
gun HTTP/2 PUSH_PROMISE authority not validated against connection origin allows cross-origin cookie injection
High Also affects gun
GHSA-26r5-4mm2-px5c
Klever-Go: Zombie-order theft: `Buy` missing `IsClaimed` guard in native marketplace
High Same weakness, CWE-841
GHSA-r4fx-v8hh-22mv
vm2: timeout Option Bypass via FinalizationRegistry Cleanup Callback (Unbounded Host Event-Loop Block)
High Same weakness, CWE-841
CVE-2026-67279
RouterOS SSH enters the connection protocol after a client-requested rekey even though user authentication was never attempted, allowing an unauthenticated…
Medium Known exploited Same weakness, CWE-841
GHSA-v358-wf77-39xv
klever-go: Percentage-transfer royalty skips the source debit at exactly-100% splits
High Same weakness, CWE-841
GHSA-qx5f-ghc2-7g5c
Ethyca Fides has a Privacy Request Identity Verification Bypass Vulnerability via Duplicate Detection
Medium Same weakness, CWE-841

Credits: Loïc Hoguin, Peter Ullrich

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor