# CVE-2026-43973: gun HTTP/1.1 response buffer has no size limit allowing server-controlled memory exhaustion

> A malicious server can exhaust client memory by sending incomplete HTTP responses, causing a node-wide crash in the gun library.

- **Severity:** High 8.7 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Jun 2026
- **Updated:** 8 Jun 2026
- **Also known as:** AZL-90141, EEF-CVE-2026-43973, GHSA-r53j-fjj5-mv77

## What is CVE-2026-43973?

CVE-2026-43973 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.

### Official description

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.

In 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.

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.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling)

## Which versions are affected by CVE-2026-43973?

3 open source packages ship an affected version, including gun. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `gun` | Hex | From 1.0.0 | 2.4.0 |
| `gun` | Hex | From 1.0.0 | 2.4.0 |
| `gun` | Hex | From 1.0.0 | 2.4.0 |

Products: Ninenines Gun.

## How do I fix CVE-2026-43973?

Upgrade gun to 2.4.0 or later.

## Is CVE-2026-43973 being exploited?

There is no known exploitation of CVE-2026-43973 in the wild and no public exploit code.

## Other vulnerabilities in ninenines gun

- [CVE-2026-43974](https://insights.sbomify.com/CVE-2026-43974/): gun HTTP/1.1 client accepts unsolicited 101 Switching Protocols response allowing server-driven protocol hijack and OOM (high 8.7)
- [CVE-2026-43972](https://insights.sbomify.com/CVE-2026-43972/): gun HTTP/2 PUSH_PROMISE authority not validated against connection origin allows cross-origin cookie injection (medium 6.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-43973 and fix it if it is affected.

What it is: CVE-2026-43973 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.
Exploitation: There is no known exploitation of CVE-2026-43973 in the wild and no public exploit code.

Affected packages and fixed versions:
- gun (Hex): affected from 1.0.0; fixed in 2.4.0
- gun (Hex): affected from 1.0.0; fixed in 2.4.0
- gun (Hex): affected from 1.0.0; fixed in 2.4.0

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-43973/ (Markdown: https://insights.sbomify.com/CVE-2026-43973/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-43973
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-43973
- OSV: https://osv.dev/vulnerability/CVE-2026-43973

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-43973/
Summaries are generated and may contain mistakes; the official description above is the record.
