Immutable: Hash-collision algorithmic complexity denial of service in Immutable.Map/Set (CVE-2026-59880)
Immutable.js versions through 5.1.7 have a denial of service vulnerability due to a hash-collision algorithmic complexity issue in Immutable.Map and Immutable.Set. Attackers controlling keys inserted into these structures can craft many keys with identical 32-bit hashes, causing insertion and lookup operations to degrade from O(1) to O(n) and resulting in O(n²) complexity for building or reading the entire set. This can consume excessive CPU and stall single-threaded runtimes like Node.js, causing denial of service. The issue is fixed in version 5.1.8 by introducing a per-process seeded secondary hash to index large collision buckets, restoring near-linear performance. Workarounds include limiting request body size and object key counts before passing untrusted data to Immutable.js.
AI Analysis
Technical Summary
Immutable.Map and Immutable.Set use a deterministic, public 32-bit string hash without per-process salting, placing keys with identical hashes into a single collision bucket scanned linearly. Attackers controlling keys can craft large sets of colliding keys (e.g., strings like "Aa" and "BB" concatenated) that cause insertion and lookup operations to degrade from amortized O(1) to O(n), and building or reading the entire structure to O(n²). This leads to CPU-bound denial of service in applications ingesting attacker-controlled object keys into Immutable structures. The vulnerability affects all versions through 5.1.7. The fix in 5.1.8 adds a seeded secondary hash to index large collision buckets, restoring near-linear complexity without breaking the public hash or key equality semantics.
Potential Impact
Applications using Immutable.js versions up to 5.1.7 that ingest attacker-controlled object keys into Immutable.Map or Immutable.Set can suffer CPU exhaustion and denial of service. This is due to the algorithmic complexity degradation from hash collisions, which can stall single-threaded runtimes such as Node.js. Applications that only store attacker input as values under fixed keys are not affected. There are no known exploits in the wild at this time.
Mitigation Recommendations
A patch is available in Immutable.js version 5.1.8 that fixes the vulnerability by introducing a per-process seeded secondary hash to handle large collision buckets. Users should upgrade to version 5.1.8 or later. Until patched, mitigate by limiting request body size, restricting object key counts and lengths, and avoiding building Immutable Maps directly from untrusted object keys.
Immutable: Hash-collision algorithmic complexity denial of service in Immutable.Map/Set (CVE-2026-59880)
Description
Immutable.js versions through 5.1.7 have a denial of service vulnerability due to a hash-collision algorithmic complexity issue in Immutable.Map and Immutable.Set. Attackers controlling keys inserted into these structures can craft many keys with identical 32-bit hashes, causing insertion and lookup operations to degrade from O(1) to O(n) and resulting in O(n²) complexity for building or reading the entire set. This can consume excessive CPU and stall single-threaded runtimes like Node.js, causing denial of service. The issue is fixed in version 5.1.8 by introducing a per-process seeded secondary hash to index large collision buckets, restoring near-linear performance. Workarounds include limiting request body size and object key counts before passing untrusted data to Immutable.js.
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, public 32-bit string hash without per-process salting, placing keys with identical hashes into a single collision bucket scanned linearly. Attackers controlling keys can craft large sets of colliding keys (e.g., strings like "Aa" and "BB" concatenated) that cause insertion and lookup operations to degrade from amortized O(1) to O(n), and building or reading the entire structure to O(n²). This leads to CPU-bound denial of service in applications ingesting attacker-controlled object keys into Immutable structures. The vulnerability affects all versions through 5.1.7. The fix in 5.1.8 adds a seeded secondary hash to index large collision buckets, restoring near-linear complexity without breaking the public hash or key equality semantics.
Potential Impact
Applications using Immutable.js versions up to 5.1.7 that ingest attacker-controlled object keys into Immutable.Map or Immutable.Set can suffer CPU exhaustion and denial of service. This is due to the algorithmic complexity degradation from hash collisions, which can stall single-threaded runtimes such as Node.js. Applications that only store attacker input as values under fixed keys are not affected. There are no known exploits in the wild at this time.
Mitigation Recommendations
A patch is available in Immutable.js version 5.1.8 that fixes the vulnerability by introducing a per-process seeded secondary hash to handle large collision buckets. Users should upgrade to version 5.1.8 or later. Until patched, mitigate by limiting request body size, restricting object key counts and lengths, and avoiding building Immutable Maps directly from untrusted object keys.
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: 08/15/2026, 18:11:53 UTC
Last updated: 09/04/2026, 16:23:01 UTC
Views: 112
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.