{"id":"CVE-2026-43974","aliases":["EEF-CVE-2026-43974","GHSA-2j82-37xg-f9wp"],"title":"gun HTTP/1.1 client accepts unsolicited 101 Switching Protocols response allowing server-driven protocol hijack and OOM","titleSource":"EEF","descriptionSource":"OSV","description":"## Summary\n\nUnexpected 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.\n\nIn `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.\n\nA 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.\n\nThis issue affects gun: from 2.0.0-pre.1 before 2.4.0.","severity":"high","score":8.7,"published":"2026-06-08T14:12:36.957Z","modified":"2026-11-25T17:23:07.645Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"Hex","name":"gun","sources":[{"name":"OSV · EEF-CVE-2026-43974","url":"https://osv.dev/vulnerability/EEF-CVE-2026-43974"}],"ranges":[{"events":[{"introduced":"2.0.0-pre.1"},{"fixed":"2.4.0"}],"type":"SEMVER"}],"versions":["2.0.0","2.0.0-rc.1","2.0.0-rc.2","2.0.1","2.1.0","2.2.0","2.3.0"],"fixed":["2.4.0"]}],"sourceAffected":[{"ranges":[{"events":[{"introduced":"a3c2edbb8c807717e2f10520c6cf1e77a62eab2e"},{"fixed":"5b48068c29ce5e112cb149b5857c7d4dc319a81b"}],"type":"GIT","repo":"https://github.com/ninenines/gun"}],"versions":["2.3.0","2.2.0","2.1.0","2.0.1","2.0.0","2.0.0-rc.2","2.0.0-rc.1","2.0.0-pre.2","2.0.0-pre.1"]}],"references":["https://cna.erlef.org/cves/CVE-2026-43974.html","https://osv.dev/vulnerability/EEF-CVE-2026-43974","https://github.com/ninenines/gun/commit/a3c2edbb8c807717e2f10520c6cf1e77a62eab2e","https://github.com/ninenines/gun/commit/5b48068c29ce5e112cb149b5857c7d4dc319a81b","https://hex.pm/packages/gun"],"sources":[{"name":"CVE","id":"CVE-2026-43974","modified":"2026-11-20T06:44:12.030Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-43974"},{"name":"OSV","id":"EEF-CVE-2026-43974","modified":"2026-11-25T17:23:07.645427028Z","url":"https://osv.dev/vulnerability/EEF-CVE-2026-43974"}],"assessments":[{"source":"EEF","vector":"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","score":8.7},{"source":"OSV","vector":"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","score":8.7}],"cve":{"records":[{"id":"CVE-2026-43974","source":"EEF","state":"PUBLISHED","reasons":[],"replacements":[],"disputed":false,"unsupportedWhenAssigned":false,"reserved":"2026-05-04T18:23:25.574Z","published":"2026-06-08T14:12:36.957Z","modified":"2026-11-20T06:44:12.030Z"}],"publishers":[{"name":"EEF","role":"CNA","organizationId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","modified":"2026-11-20T06:44:12.030Z"},{"name":"CISA-ADP","role":"ADP","organizationId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","modified":"2026-06-08T15:41:49.498Z"}],"references":[{"url":"https://cna.erlef.org/cves/CVE-2026-43974.html","tags":["related","third-party-advisory"],"source":"EEF"},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-43974","tags":["related"],"source":"EEF"},{"url":"https://github.com/ninenines/gun/commit/a3c2edbb8c807717e2f10520c6cf1e77a62eab2e","tags":["related"],"source":"EEF"},{"url":"https://github.com/ninenines/gun/commit/5b48068c29ce5e112cb149b5857c7d4dc319a81b","tags":["patch"],"source":"EEF"}],"weaknesses":[{"id":"CWE-841","description":"CWE-841 Improper Enforcement of Behavioral Workflow","source":"EEF"}],"applicability":[{"source":"EEF","statements":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:ninenines:gun:*:*:*:*:*:*:*:*","versionEndExcluding":"2.4.0","versionStartIncluding":"2.0.0-pre.1","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}]}],"prioritization":[{"source":"CISA-ADP","type":"SSVC","role":"CISA Coordinator","timestamp":"2026-06-08T15:41:42.657559Z","decisions":[{"name":"Exploitation","value":"none"},{"name":"Automatable","value":"yes"},{"name":"Technical Impact","value":"partial"}]}]},"products":[{"vendor":"ninenines","name":"gun","platforms":[],"versions":[{"version":"2.0.0-pre.1","status":"affected","lessThan":"2.4.0","versionType":"semver"}],"defaultStatus":"unaffected","packageURL":"pkg:hex/gun","packageIdentity":{"ecosystem":"Hex","name":"gun"},"cpes":["cpe:2.3:a:ninenines:gun:*:*:*:*:*:*:*:*"],"source":"EEF","url":"https://www.cve.org/CVERecord?id=CVE-2026-43974"},{"vendor":"ninenines","name":"gun","platforms":[],"versions":[{"version":"a3c2edbb8c807717e2f10520c6cf1e77a62eab2e","status":"affected","lessThan":"5b48068c29ce5e112cb149b5857c7d4dc319a81b","versionType":"git"}],"defaultStatus":"unaffected","packageURL":"pkg:github/ninenines/gun","cpes":["cpe:2.3:a:ninenines:gun:*:*:*:*:*:*:*:*"],"source":"EEF","url":"https://www.cve.org/CVERecord?id=CVE-2026-43974"}],"remediation":[],"observedAt":"2026-11-25T18:38:12.556Z","kev":{"status":"not-listed","checkedAt":"2026-11-28T23:10:31.542Z"},"coverage":[{"source":"NVD","status":"available","checkedAt":"2026-11-20T07:25:34.554Z","attemptedAt":"2026-11-20T07:25:34.554Z"},{"source":"GHSA","status":"available","checkedAt":"2026-11-20T07:25:34.554Z","attemptedAt":"2026-11-20T07:25:34.554Z"},{"source":"EUVD","status":"available","checkedAt":"2026-11-20T07:25:34.664Z","attemptedAt":"2026-11-20T07:25:34.664Z"},{"source":"EPSS","status":"available","checkedAt":"2026-11-20T07:25:33.810Z","attemptedAt":"2026-11-20T07:25:33.810Z"}],"evidence":[{"source":"FIRST EPSS","id":"CVE-2026-43974","url":"https://www.first.org/epss/","probability":0.00482,"percentile":0.42298,"date":"2026-11-19","checkedAt":"2026-11-20T07:25:33.810Z"},{"source":"GitHub Advisory Database","id":"GHSA-2j82-37xg-f9wp","url":"https://github.com/advisories/GHSA-2j82-37xg-f9wp","modified":"2026-07-29T15:46:08Z","checkedAt":"2026-11-20T07:25:34.554Z"},{"source":"NVD","id":"CVE-2026-43974","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43974","modified":"2026-11-20T07:17:16.560","score":8.7,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","checkedAt":"2026-11-20T07:25:34.554Z"},{"source":"NVD","id":"CVE-2026-43974","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43974","modified":"2026-11-20T07:17:16.560","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","checkedAt":"2026-11-20T07:25:34.554Z"},{"source":"ENISA EUVD","id":"EUVD-2026-35072","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-35072","modified":"Jun 8, 2026, 4:34:38 PM","score":8.7,"vector":"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","checkedAt":"2026-11-20T07:25:34.664Z"}],"aiSummary":{"text":"The gun HTTP/1.1 client, versions 2.0.0-pre.1 before 2.4.0, accepts unsolicited 101 Switching Protocols responses, allowing a malicious server to force the client into raw protocol mode, potentially causing memory exhaustion. The client does not verify if an Upgrade header was sent in the request. A malicious server can flood the client with arbitrary bytes.","model":"@cf/meta/llama-3.3-70b-instruct-fp8-fast","generatedAt":"2026-11-20T07:41:05.336Z","sources":[{"name":"CVE","url":"https://www.cve.org/CVERecord?id=CVE-2026-43974"},{"name":"OSV","url":"https://osv.dev/vulnerability/EEF-CVE-2026-43974"}]}}