CVE-2026-43973: Gun Remote Code Execution Vulnerability
HIGHCVE-2026-43973 is a HIGH remote code execution vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Gun libraries in the Hex ecosystem. The issue involves gun has an uncontrolled resource consumption vulnerability. Remediation is available by upgrading affected packages to version 2.4.0.
CVE-2026-43973 at a Glance
How to Fix CVE-2026-43973
To remediate this vulnerability, upgrade all affected Gun dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade gun to 2.4.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for gun
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-43973, inspect your project dependencies for Gun:
inspect dependencies for gun
Analyze the terminal output to locate any version of Gun in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Gun, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-43973 Affected Gun Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gun
|
Hex |
≥ 1.0.0
< 2.4.0
|
2.4.0
|
References
Frequently Asked Questions
What is CVE-2026-43973?
Which Gun versions are affected?
What version fixes CVE-2026-43973?
Is gun affected?
What CWE is associated with CVE-2026-43973?
How can I check Hex dependencies for CVE-2026-43973?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r53j-fjj5-mv77",
"modified" : "2026-07-29T15:45:14Z",
"published" : "2026-06-08T15:33:00Z",
"aliases" : [ "CVE-2026-43973" ],
"summary" : "gun has an Uncontrolled Resource Consumption vulnerability",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Hex",
"name" : "gun"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "2.4.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-43973"
}, {
"type" : "WEB",
"url" : "https://github.com/ninenines/gun/commit/f3e7e0568b3c4cf9fa4bea79d5116e67ce76ad25"
}, {
"type" : "WEB",
"url" : "https://cna.erlef.org/cves/CVE-2026-43973.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ninenines/gun"
}, {
"type" : "WEB",
"url" : "https://osv.dev/vulnerability/EEF-CVE-2026-43973"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-29T15:45:14Z",
"nvd_published_at" : "2026-06-08T15:16:46Z"
}
}