{"answers":{"affected":"3 open source packages ship an affected version, including gun. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-43974 in the wild and no public exploit code.","fix":"Upgrade gun to 2.4.0 or later.","what":"CVE-2026-43974 is a high-severity denial of service vulnerability in ninenines gun, published on 8 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-43974 and fix it if it is affected.\n\nWhat it is: CVE-2026-43974 is a high-severity denial of service vulnerability in ninenines gun, published on 8 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-43974 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- gun (Hex): affected from 2.0.0; fixed in 2.4.0\n- gun (Hex): affected from 2.0.0; fixed in 2.4.0\n- gun (Hex): affected from 2.0.0; fixed in 2.4.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-43974/ (Markdown: https://insights.sbomify.com/CVE-2026-43974/index.md)","id":"CVE-2026-43974","markdown":"https://insights.sbomify.com/CVE-2026-43974/index.md","name":"CVE-2026-43974","record":{"aliases":["EEF-CVE-2026-43974","GHSA-2j82-37xg-f9wp"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Erlang HTTP client","requires_auth":"none","summary":"A malicious server can force the gun HTTP client into raw mode via unsolicited 101 responses, causing memory exhaustion and VM crashes.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"EEF","cpe":[{"product":"gun","vendor":"ninenines"}],"cvss":{"score":8.7,"severity":"high","source":"cna","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","version":"4.0"},"cwes":[{"id":"CWE-841","name":"Improper Enforcement of Behavioral Workflow"}],"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.\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 before 2.4.0.","ecosystems":["Hex"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"gun HTTP/1.1 client accepts unsolicited 101 Switching Protocols response allowing server-driven protocol hijack and OOM","id":"CVE-2026-43974","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Hex","product":null,"products":[],"type":"denial_of_service","year":"2026"},"n_packages":3,"n_references":3,"next":{"headline":"Apache Wicket: Possible malicious path traversal in FolderUploadsFileManager","id":"CVE-2026-43975"},"packages":[{"ecosystem":"Hex","fixed":["2.4.0"],"introduced":["2.0.0"],"last_affected":[],"package":"gun","purl":"pkg:hex/gun","source":"EEF-CVE-2026-43974"},{"ecosystem":"Hex","fixed":["2.4.0"],"introduced":["2.0.0"],"last_affected":[],"package":"gun","purl":null,"source":"GHSA-2j82-37xg-f9wp"},{"ecosystem":"Hex","fixed":["2.4.0"],"introduced":["2.0.0"],"last_affected":[],"package":"gun","purl":"pkg:hex/gun","source":"GHSA-2j82-37xg-f9wp"}],"prev":{"headline":"gun HTTP/1.1 response buffer has no size limit allowing server-controlled memory exhaustion","id":"CVE-2026-43973"},"products":["gun"],"published":"2026-06-08","related":[{"cvss_score":8.7,"headline":"gun HTTP/1.1 response buffer has no size limit allowing server-controlled memory exhaustion","id":"CVE-2026-43973","kev_date_added":null,"published":"2026-06-08"},{"cvss_score":6.3,"headline":"gun HTTP/2 PUSH_PROMISE authority not validated against connection origin allows cross-origin cookie injection","id":"CVE-2026-43972","kev_date_added":null,"published":"2026-06-08"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Erlang Ecosystem Foundation","prefix":"EEF"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-06-08","vendors":["ninenines"]},"summary":"A malicious server can force the gun HTTP client into raw mode via unsolicited 101 responses, causing memory exhaustion and VM crashes.","url":"https://insights.sbomify.com/CVE-2026-43974/"}