# CVE-2026-43974: gun HTTP/1.1 client accepts unsolicited 101 Switching Protocols response allowing server-driven protocol hijack and OOM

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.7
- **CVSS:** 8.7 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: None; Privileges required: None; User interaction: None; Confidentiality impact: None; Integrity impact: None; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.66% (percentile 47, 2026-11-26)
- **CWE:** CWE-841
- **Published:** 2026-06-08T14:12:36.957Z
- **Modified:** 2026-11-20T07:17:16.560Z

## Who should check

- Anyone running ninenines gun \>= 2.0.0-pre.1, \< 2.4.0
- Anyone running ninenines gun \>= a3c2edbb8c807717e2f10520c6cf1e77a62eab2e, \< 5b48068c29ce5e112cb149b5857c7d4dc319a81b

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

## Affected and fixed versions

- ninenines gun: \>= 2.0.0-pre.1, \< 2.4.0 (cvelist)
- ninenines gun: \>= a3c2edbb8c807717e2f10520c6cf1e77a62eab2e, \< 5b48068c29ce5e112cb149b5857c7d4dc319a81b (cvelist)

## Mitigation

- Upgrade gun to 2.4.0 or later.
- Upgrade gun to 5b48068c29ce5e112cb149b5857c7d4dc319a81b or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-43974. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-43974.md
Affected: ninenines gun >= 2.0.0-pre.1, < 2.4.0; ninenines gun >= a3c2edbb8c807717e2f10520c6cf1e77a62eab2e, < 5b48068c29ce5e112cb149b5857c7d4dc319a81b
Fixed in: ninenines gun 2.4.0, ninenines gun 5b48068c29ce5e112cb149b5857c7d4dc319a81b

Steps:
1. Search this machine and project for ninenines gun: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-43974 being exploited?

There is no confirmed exploitation: CVE-2026-43974 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.66% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-43974?

High: CVSS 8.7 (v4.0, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-43974?

ninenines gun \>= 2.0.0-pre.1, \< 2.4.0; ninenines gun \>= a3c2edbb8c807717e2f10520c6cf1e77a62eab2e, \< 5b48068c29ce5e112cb149b5857c7d4dc319a81b.

### Is there a fix for CVE-2026-43974?

Yes. Fixed in ninenines gun 2.4.0, ninenines gun 5b48068c29ce5e112cb149b5857c7d4dc319a81b. Upgrade gun to 2.4.0 or later. Upgrade gun to 5b48068c29ce5e112cb149b5857c7d4dc319a81b or later.

### How do I check if I'm affected by CVE-2026-43974?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://osv.dev/vulnerability/EEF-CVE-2026-43974>
- patch: <https://github.com/ninenines/gun/commit/a3c2edbb8c807717e2f10520c6cf1e77a62eab2e>
- patch: <https://github.com/ninenines/gun/commit/5b48068c29ce5e112cb149b5857c7d4dc319a81b>
- other: <https://cna.erlef.org/cves/CVE-2026-43974.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-43974>

HTML: <https://flawdb.com/CVE-2026-43974> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-43974>
