{"id":"CVE-2026-43973","aliases":["CVE-2026-43973","GHSA-r53j-fjj5-mv77","EEF-CVE-2026-43973"],"related":[],"kind":"vulnerability","state":"published","title":"gun HTTP/1.1 response buffer has no size limit allowing server-controlled memory exhaustion","summary":"Uncontrolled Resource Consumption vulnerability in ninenines gun (gun_http module) allows a malicious server to exhaust client memory via unbounded HTTP/1.1 response buffering.\n\nIn gun_http:handle/5, three clauses accumulate incoming TCP data into the connection's buffer field using binary concatenation with no upper-bound check: the head clause appends data until the \\r\\n\\r\\n header terminator is found; the body_chunked clause appends data whenever cow_http_te:stream_chunked/2 returns a more result indicating an incomplete chunk boundary; and the body_trailer clause appends data until the trailing \\r\\n\\r\\n is found. In each case, when the expected terminator never arrives, the enlarged binary is stored back into state and the process waits for more data, with no configurable or hard-coded ceiling on buffer size.\n\nA malicious or compromised server can exploit this by sending a partial response that never completes. For example, a response may begin with HTTP/1.1 200 OK\\r\\nX-Pad:  followed by an unbounded stream of arbitrary bytes, never sending the header terminator. The gun connection process will continuously append the incoming data to its buffer, causing unbounded heap growth. Because BEAM imposes no per-process heap limit by default, a single malicious connection can exhaust all available memory on the node, causing a node-wide out-of-memory crash.\n\nThis issue affects gun: from 1.0.0-pre.1 before 2.4.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Uncontrolled Resource Consumption vulnerability in ninenines gun (gun_http module) allows a malicious server to exhaust client memory via unbounded HTTP/1.1 response buffering.\n\nIn gun_http:handle/5, three clauses accumulate incoming TCP data into the connection's buffer field using binary concatenation with no upper-bound check: the head clause appends data until the \\r\\n\\r\\n header terminator is found; the body_chunked clause appends data whenever cow_http_te:stream_chunked/2 returns a more result indicating an incomplete chunk boundary; and the body_trailer clause appends data until the trailing \\r\\n\\r\\n is found. In each case, when the expected terminator never arrives, the enlarged binary is stored back into state and the process waits for more data, with no configurable or hard-coded ceiling on buffer size.\n\nA malicious or compromised server can exploit this by sending a partial response that never completes. For example, a response may begin with HTTP/1.1 200 OK\\r\\nX-Pad:  followed by an unbounded stream of arbitrary bytes, never sending the header terminator. The gun connection process will continuously append the incoming data to its buffer, causing unbounded heap growth. Because BEAM imposes no per-process heap limit by default, a single malicious connection can exhaust all available memory on the node, causing a node-wide out-of-memory crash.\n\nThis issue affects gun: from 1.0.0-pre.1 before 2.4.0.","source":"cvelist"},{"lang":"en","text":"Uncontrolled Resource Consumption vulnerability in ninenines gun (gun_http module) allows a malicious server to exhaust client memory via unbounded HTTP/1.1 response buffering.\n\nIn gun_http:handle/5, three clauses accumulate incoming TCP data into the connection's buffer field using binary concatenation with no upper-bound check: the head clause appends data until the \\r\\n\\r\\n header terminator is found; the body_chunked clause appends data whenever cow_http_te:stream_chunked/2 returns a more result indicating an incomplete chunk boundary; and the body_trailer clause appends data until the trailing \\r\\n\\r\\n is found. In each case, when the expected terminator never arrives, the enlarged binary is stored back into state and the process waits for more data, with no configurable or hard-coded ceiling on buffer size.\n\nA malicious or compromised server can exploit this by sending a partial response that never completes. For example, a response may begin with HTTP/1.1 200 OK\\r\\nX-Pad:  followed by an unbounded stream of arbitrary bytes, never sending the header terminator. The gun connection process will continuously append the incoming data to its buffer, causing unbounded heap growth. Because BEAM imposes no per-process heap limit by default, a single malicious connection can exhaust all available memory on the node, causing a node-wide out-of-memory crash.\n\nThis issue affects gun: from 1.0.0 before 2.4.0.","format":"markdown","source":"ghsa"},{"lang":"en","text":"## Summary\n\nUncontrolled Resource Consumption vulnerability in ninenines gun (`gun_http` module) allows a malicious server to exhaust client memory via unbounded HTTP/1.1 response buffering.\n\nIn `gun_http:handle/5`, three clauses accumulate incoming TCP data into the connection's `buffer` field using binary concatenation with no upper-bound check: the `head` clause appends data until the `\\r\\n\\r\\n` header terminator is found; the `body_chunked` clause appends data whenever `cow_http_te:stream_chunked/2` returns a `more` result indicating an incomplete chunk boundary; and the `body_trailer` clause appends data until the trailing `\\r\\n\\r\\n` is found. In each case, when the expected terminator never arrives, the enlarged binary is stored back into state and the process waits for more data, with no configurable or hard-coded ceiling on buffer size.\n\nA malicious or compromised server can exploit this by sending a partial response that never completes. For example, a response may begin with `HTTP/1.1 200 OK\\r\\nX-Pad: ` followed by an unbounded stream of arbitrary bytes, never sending the header terminator. The gun connection process will continuously append the incoming data to its buffer, causing unbounded heap growth. Because BEAM imposes no per-process heap limit by default, a single malicious connection can exhaust all available memory on the node, causing a node-wide out-of-memory crash.\n\nThis issue affects gun: from 1.0.0-pre.1 before 2.4.0.","format":"markdown","source":"eef"},{"lang":"es","text":"Vulnerabilidad de Consumo de Recursos Incontrolado en ninenines gun (módulo gun_http) permite a un servidor malicioso agotar la memoria del cliente a través del almacenamiento en búfer de respuestas HTTP/1.1 ilimitado.\n\nEn gun_http:handle/5, tres cláusulas acumulan datos TCP entrantes en el campo de búfer de la conexión utilizando concatenación binaria sin verificación de límite superior: la cláusula 'head' añade datos hasta que se encuentra el terminador de encabezado \\r\\n\\r\\n; la cláusula 'body_chunked' añade datos cada vez que cow_http_te:stream_chunked/2 devuelve un resultado 'more' indicando un límite de fragmento incompleto; y la cláusula 'body_trailer' añade datos hasta que se encuentra el \\r\\n\\r\\n final. En cada caso, cuando el terminador esperado nunca llega, el binario ampliado se almacena de nuevo en el estado y el proceso espera más datos, sin un límite configurable o codificado rígidamente para el tamaño del búfer.\n\nUn servidor malicioso o comprometido puede explotar esto enviando una respuesta parcial que nunca se completa. Por ejemplo, una respuesta puede comenzar con HTTP/1.1 200 OK\\r\\nX-Pad: seguido de un flujo ilimitado de bytes arbitrarios, sin enviar nunca el terminador de encabezado. El proceso de conexión de gun añadirá continuamente los datos entrantes a su búfer, causando un crecimiento ilimitado del 'heap'. Debido a que BEAM no impone un límite de 'heap' por proceso por defecto, una única conexión maliciosa puede agotar toda la memoria disponible en el nodo, causando un fallo por falta de memoria en todo el nodo.\n\nEste problema afecta a gun: desde 1.0.0 antes de 2.4.0.","source":"nvd"}],"published":"2026-06-08T14:12:42.128Z","modified":"2026-11-25T17:23:07.370Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","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,"rating":"HIGH"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","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,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"HIGH"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","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"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-770"],"affected":[{"ranges":[{"type":"semver","introduced":"1.0.0-pre.1","fixed":"2.4.0","status":"affected"}],"vendor":"ninenines","product":"gun","package":"gun","cpe":"cpe:2.3:a:ninenines:gun:*:*:*:*:*:*:*:*","repo":"https://github.com/ninenines/gun","source":"cvelist"},{"ranges":[{"type":"git","introduced":"11dfe71f4b9aedaaedea2ad3b2f32fd006a8480f","fixed":"f3e7e0568b3c4cf9fa4bea79d5116e67ce76ad25","status":"affected"}],"vendor":"ninenines","product":"gun","package":"ninenines/gun","cpe":"cpe:2.3:a:ninenines:gun:*:*:*:*:*:*:*:*","repo":"https://github.com/ninenines/gun","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.0.0","status":"affected","fixed":"2.4.0"}],"ecosystem":"Hex","package":"gun","purl":"pkg:hex/gun","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.0.0-pre.1","status":"affected","fixed":"2.4.0"}],"ecosystem":"Hex","package":"gun","purl":"pkg:hex/gun","source":"eef"},{"ranges":[{"type":"git","introduced":"11dfe71f4b9aedaaedea2ad3b2f32fd006a8480f","status":"affected","fixed":"f3e7e0568b3c4cf9fa4bea79d5116e67ce76ad25"}],"repo":"https://github.com/ninenines/gun","source":"eef"},{"ranges":[{"status":"affected","introduced":"1.0.0","fixed":"2.4.0"}],"vendor":"ninenines","product":"gun","cpe":"cpe:2.3:a:ninenines:gun:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://cna.erlef.org/cves/CVE-2026-43973.html","tags":["related","third-party-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-43973","tags":["patch","related","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ninenines/gun/commit/11dfe71f4b9aedaaedea2ad3b2f32fd006a8480f","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/ninenines/gun/commit/f3e7e0568b3c4cf9fa4bea79d5116e67ce76ad25","tags":["fix","patch","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43973","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ninenines/gun","tags":["package"],"sources":["ghsa"]},{"url":"https://hex.pm/packages/gun","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Loïc Hoguin"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-06-08T15:48:05.292Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-43973","url":"https://www.cve.org/CVERecord?id=CVE-2026-43973","licence":"CVE Terms of Use","modified":"2026-11-20T06:42:30.715Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r53j-fjj5-mv77","url":"https://github.com/advisories/GHSA-r53j-fjj5-mv77","licence":"CC-BY-4.0","modified":"2026-07-29T16:11:37.191Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-43973","url":"https://osv.dev/vulnerability/EEF-CVE-2026-43973","licence":"CC-BY-4.0","modified":"2026-11-25T17:23:07.370Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-43973","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43973","licence":"Public domain","modified":"2026-11-20T07:17:16.290Z"}],"updatedAt":"2026-11-25T22:59:23.970Z","epss":{"score":0.00498,"percentile":0.44262,"date":"2026-12-01T12:00:22.000Z"}}