CVE-2026-43973: gun HTTP/1.1 response buffer has no size limit allowing server-controlled memory exhaustion
gun HTTP/1.1 response buffer has no size limit allowing server-controlled memory exhaustion
Other sources
Uncontrolled Resource Consumption vulnerability in ninenines gun (gunhttp module) allows a malicious server to exhaust client memory via unbounded HTTP/1.1 response buffering.
In gunhttp: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 bodychunked clause appends data whenever cowhttpte:streamchunked/2 returns a more result indicating an incomplete chunk boundary; and the bodytrailer 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.
A 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.
This issue affects gun: from 1.0.0 before 2.4.0.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 3.13.7-6 - Upgrade
Upgrade
ninenines gun (gun_http module)to a version that resolves this vulnerability.Fixed in 2.4.0 - Compensating control
Add an external limit/guard (e.g., at a reverse proxy/WAF/load balancer/egress gateway) to cap or drop HTTP/1.1 responses that do not complete (e.g., missing header terminator \r\n\r\n or incomplete chunk boundaries) to prevent unbounded buffering on the client.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-43973?
CVE-2026-43973 has a high severity rating of 8.7 according to the CVSS scoring system.
What is CVE-2026-43973 about?
CVE-2026-43973 is a vulnerability in the ninenines gun HTTP/1.1 response buffer that allows for uncontrolled resource consumption and can lead to memory exhaustion.
How do I fix CVE-2026-43973?
To fix CVE-2026-43973, update to the latest version of the ninenines gun software where the vulnerability has been addressed.
What type of impact does CVE-2026-43973 have?
CVE-2026-43973 allows a malicious server to exhaust client memory by exploiting unbounded HTTP/1.1 response buffering.
Who is affected by CVE-2026-43973?
CVE-2026-43973 affects users of the ninenines gun software that utilize the gun_http module in their applications.