CVE-2026-43974
gun HTTP/1.1 client accepts unsolicited 101 Switching Protocols response allowing server-driven protocol hijack and OOM
Check your servers for CVE-2026-43974
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-43974 affects gun, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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-pre.1 before 2.4.0.
Severity (CVSS)
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: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Attack requirements
- none: an attack works without special conditions on the target
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Impact on the vulnerable system
- confidentiality none, integrity none, availability high: what an attacker can read, change or stop in the vulnerable component
- Impact on other systems
- confidentiality none, integrity none, availability none: what an attacker can read, change or stop beyond it
Exploitation
EPSS 0.50%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 44.2% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 8 Jun 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- yes: an attacker can automate the attack across many targets
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-841 Improper Enforcement of Behavioral Workflow
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
gun
package
gun |
affected from 2.0.0-pre.1, before 2.4.0
Other versions: unaffected
|
|
gun
package
ninenines/gun |
affected from a3c2edbb8c807717e2f10520c6cf1e77a62eab2e, before 5b48068c29ce5e112cb149b5857c7d4dc319a81b
Other versions: unaffected
|
Is my server affected?
Find the installed version of gun and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i gun
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-43974 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-43974RHEL, Rocky, Alma, Fedora
rpm -q gun
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-43974Alpine
apk list --installed | grep -i gunWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-43974
trivy image --scanners vuln IMAGE | grep CVE-2026-43974
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- EEF CNA record for CVE-2026-43974 cna.erlef.org · related, third party advisory
Patches and release notes
- Fix commit 5b48068 in ninenines/gun github.com · patch
Other references
- OSV record EEF-CVE-2026-43974 osv.dev · related
- Introducing commit a3c2edb in ninenines/gun github.com · related
Source: the record CVE-2026-43974 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse