{"id":"CVE-2026-43974","sourceIdentifier":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","published":"2026-06-08T15:16:46.870","lastModified":"2026-11-20T07:17:16.560","vulnStatus":"Modified","cveTags":[],"descriptions":[{"lang":"en","value":"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-pre.1 before 2.4.0."},{"lang":"es","value":"Una vulnerabilidad de código de estado o valor de retorno inesperado en ninenines gun (módulo gun_http) permite a un servidor HTTP malicioso forzar al cliente a un modo de protocolo sin procesar a través de una respuesta 101 Switching Protocols no solicitada.\n\nEn gun_http:handle_inform/8, cuando se recibe una respuesta 101 Switching Protocols sobre HTTP/1.1, la función verifica solo que el encabezado Upgrade es sintácticamente válido y que la referencia de flujo es una referencia simple(). No verifica si el cliente alguna vez envió un encabezado Upgrade o Connection: upgrade en la solicitud correspondiente. Debido a que esta verificación está ausente, cualquier respuesta 101 (solicitada o no) hace que gun envíe un mensaje gun_upgrade al llamador y transicione toda la conexión a modo de protocolo sin procesar.\n\nUn servidor HTTP malicioso o comprometido puede enviar una respuesta 101 no solicitada a cualquier solicitud HTTP/1.1, haciendo que el cliente gun abandone el encuadre HTTP para esa conexión. Una vez en modo sin procesar, gun_raw no aplica control de flujo (flow=infinity) y rearma el modo activo del socket después de cada paquete recibido, por lo que el servidor puede inundar al cliente con bytes arbitrarios. Estos se reenvían como mensajes gun_data ilimitados al proceso propietario, agotando su buzón y la memoria BEAM, lo que finalmente provoca el bloqueo de la VM.\n\nEste problema afecta a gun: desde 2.0.0 antes de 2.4.0."}],"affected":[{"source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","affectedData":[{"vendor":"ninenines","product":"gun","defaultStatus":"unaffected","collectionURL":"https://repo.hex.pm","packageName":"gun","cpes":["cpe:2.3:a:ninenines:gun:*:*:*:*:*:*:*:*"],"modules":["gun_http"],"programFiles":["src/gun_http.erl"],"programRoutines":[{"name":"gun_http:handle_head/4"},{"name":"gun_http:handle_inform/7"},{"name":"gun_http:handle_inform/8"}],"repo":"https://github.com/ninenines/gun","packageURL":"pkg:hex/gun","versions":[{"version":"2.0.0-pre.1","lessThan":"2.4.0","versionType":"semver","status":"affected"}]},{"vendor":"ninenines","product":"gun","defaultStatus":"unaffected","collectionURL":"https://github.com","packageName":"ninenines/gun","cpes":["cpe:2.3:a:ninenines:gun:*:*:*:*:*:*:*:*"],"modules":["gun_http"],"programFiles":["src/gun_http.erl"],"programRoutines":[{"name":"gun_http:handle_head/4"},{"name":"gun_http:handle_inform/7"},{"name":"gun_http:handle_inform/8"}],"repo":"https://github.com/ninenines/gun","packageURL":"pkg:github/ninenines/gun","versions":[{"version":"a3c2edbb8c807717e2f10520c6cf1e77a62eab2e","lessThan":"5b48068c29ce5e112cb149b5857c7d4dc319a81b","versionType":"git","status":"affected"}]}]}],"metrics":{"cvssMetricV40":[{"source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","type":"Secondary","cvssData":{"version":"4.0","vectorString":"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","baseScore":8.7,"baseSeverity":"HIGH","attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","confidentialityRequirement":"NOT_DEFINED","integrityRequirement":"NOT_DEFINED","availabilityRequirement":"NOT_DEFINED","modifiedAttackVector":"NOT_DEFINED","modifiedAttackComplexity":"NOT_DEFINED","modifiedAttackRequirements":"NOT_DEFINED","modifiedPrivilegesRequired":"NOT_DEFINED","modifiedUserInteraction":"NOT_DEFINED","modifiedVulnConfidentialityImpact":"NOT_DEFINED","modifiedVulnIntegrityImpact":"NOT_DEFINED","modifiedVulnAvailabilityImpact":"NOT_DEFINED","modifiedSubConfidentialityImpact":"NOT_DEFINED","modifiedSubIntegrityImpact":"NOT_DEFINED","modifiedSubAvailabilityImpact":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED"}}],"cvssMetricV31":[{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":3.9,"impactScore":3.6}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-06-08T15:41:42.657559Z","id":"CVE-2026-43974","options":[{"exploitation":"none"},{"automatable":"yes"},{"technicalImpact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"weaknesses":[{"source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","type":"Secondary","description":[{"lang":"en","value":"CWE-841"}]}],"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:ninenines:gun:*:*:*:*:*:*:*:*","versionStartIncluding":"2.0.0","versionEndExcluding":"2.4.0","matchCriteriaId":"749B0FB5-7AC7-4FAB-A461-90450AA8AC67"}]}]}],"references":[{"url":"https://cna.erlef.org/cves/CVE-2026-43974.html","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":["Third Party Advisory"]},{"url":"https://github.com/ninenines/gun/commit/5b48068c29ce5e112cb149b5857c7d4dc319a81b","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":["Patch"]},{"url":"https://github.com/ninenines/gun/commit/a3c2edbb8c807717e2f10520c6cf1e77a62eab2e","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db"},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-43974","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":["Patch","Third Party Advisory"]}]}