Immutabl: Hash-collision algorithmic complexity denial of service in Immutable.Map/Set (CVE-2026-59880)
Immutable.js versions through 5.1.7 contain a hash-collision algorithmic complexity vulnerability in Immutable.Map and Immutable.Set. The deterministic, public string hash function allows attackers controlling keys to craft many colliding keys that degrade insertion and lookup performance from O(1) to O(n), causing CPU exhaustion and denial of service in single-threaded runtimes like Node.js. The issue is fixed in version 5.1.8 by introducing a seeded secondary hash to index large collision buckets. Applications ingesting untrusted object keys into Immutable structures are vulnerable, while those only using attacker input as values under fixed keys are not affected.
AI Analysis
Technical Summary
Immutable.Map and Immutable.Set use a deterministic 32-bit string hash without per-process salting, causing keys with colliding hashes to be stored in a single collision bucket scanned linearly. An attacker controlling keys can craft many colliding keys, degrading insertion and lookup from amortized O(1) to O(n) per operation and O(n²) for building or reading the entire set. This leads to CPU-bound denial of service in applications ingesting attacker-controlled keys into Immutable structures. The vulnerability affects all versions through 5.1.7. It is fixed in 5.1.8 by adding a per-process seeded secondary hash for large collision buckets, maintaining the public hash function and key equality checks unchanged.
Potential Impact
Applications using Immutable.js to build Map or Set structures from attacker-controlled object keys can experience severe CPU consumption and event loop stalls, resulting in denial of service. This affects single-threaded runtimes such as Node.js where the event loop can be blocked. Applications that only use attacker input as values under fixed keys are not impacted. The vulnerability can be exploited by crafting many keys with colliding hashes, causing quadratic time complexity in insertion and lookup operations.
Mitigation Recommendations
A fix is available in Immutable.js version 5.1.8, which introduces a per-process seeded secondary hash to mitigate large collision buckets and restore near-linear performance. Users should upgrade to version 5.1.8 or later. Before upgrading, as a workaround, limit request body size, restrict object key count and length, and avoid building Immutable.Map or Immutable.Set directly from untrusted object keys to reduce risk.
Immutabl: Hash-collision algorithmic complexity denial of service in Immutable.Map/Set (CVE-2026-59880)
Description
Immutable.js versions through 5.1.7 contain a hash-collision algorithmic complexity vulnerability in Immutable.Map and Immutable.Set. The deterministic, public string hash function allows attackers controlling keys to craft many colliding keys that degrade insertion and lookup performance from O(1) to O(n), causing CPU exhaustion and denial of service in single-threaded runtimes like Node.js. The issue is fixed in version 5.1.8 by introducing a seeded secondary hash to index large collision buckets. Applications ingesting untrusted object keys into Immutable structures are vulnerable, while those only using attacker input as values under fixed keys are not affected.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Immutable.Map and Immutable.Set use a deterministic 32-bit string hash without per-process salting, causing keys with colliding hashes to be stored in a single collision bucket scanned linearly. An attacker controlling keys can craft many colliding keys, degrading insertion and lookup from amortized O(1) to O(n) per operation and O(n²) for building or reading the entire set. This leads to CPU-bound denial of service in applications ingesting attacker-controlled keys into Immutable structures. The vulnerability affects all versions through 5.1.7. It is fixed in 5.1.8 by adding a per-process seeded secondary hash for large collision buckets, maintaining the public hash function and key equality checks unchanged.
Potential Impact
Applications using Immutable.js to build Map or Set structures from attacker-controlled object keys can experience severe CPU consumption and event loop stalls, resulting in denial of service. This affects single-threaded runtimes such as Node.js where the event loop can be blocked. Applications that only use attacker input as values under fixed keys are not impacted. The vulnerability can be exploited by crafting many keys with colliding hashes, causing quadratic time complexity in insertion and lookup operations.
Mitigation Recommendations
A fix is available in Immutable.js version 5.1.8, which introduces a per-process seeded secondary hash to mitigate large collision buckets and restore near-linear performance. Users should upgrade to version 5.1.8 or later. Before upgrading, as a workaround, limit request body size, restrict object key count and length, and avoid building Immutable.Map or Immutable.Set directly from untrusted object keys to reduce risk.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-xvcm-6775-5m9r
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-59880"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a600ac99c2644c7f8fe6c7c
Added to database: 07/22/2026, 00:11:53 UTC
Last enriched: 07/22/2026, 00:57:46 UTC
Last updated: 07/22/2026, 00:58:47 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.