Immutable.js `List` 32-bit trie overflow → unrecoverable DoS (CVE-2026-59879)
Immutable.js versions prior to 4.3.9 contain a vulnerability in the List data structure where certain operations mishandle indices or sizes in the range [2^30, 2^31). This causes either an uncatchable infinite loop on empty Lists or an out-of-memory crash (process abort) on populated Lists. Additionally, a silent data corruption issue exists where setSize can wrap large values, causing incorrect List sizes without crashing. The vulnerability can be triggered remotely by unauthenticated input that controls List indices or key-paths, leading to denial of service. No confidentiality, integrity, or remote code execution impacts are present.
AI Analysis
Technical Summary
The vulnerability in Immutable.js List arises from the use of signed 32-bit bitwise arithmetic in the internal 32-wide trie implementation. Operations like set, setIn, updateIn, and setSize mishandle indices or sizes ≥ 2^30 due to JavaScript's 32-bit shift behavior causing infinite loops or heap exhaustion. On empty Lists, this results in an infinite CPU spin that cannot be caught by try/catch. On populated Lists, it causes unbounded memory allocation leading to process aborts (SIGABRT or OOM kills). The setSize method also silently corrupts List size by wrapping large values due to coercion to 32-bit integers. The root cause is a loop relying on 1 << (newLevel + SHIFT) which wraps and causes the loop to never terminate. The fix involves upfront validation to throw RangeErrors for sizes exceeding 2^30 and replacing the shift operation with a safe non-wrapping alternative. This vulnerability affects versions before 4.3.9.
Potential Impact
This vulnerability impacts availability by causing denial of service through infinite loops or process crashes when untrusted input controls List indices or key-paths. It can be triggered remotely with a small unauthenticated request. There is no impact on confidentiality, integrity, or remote code execution. The companion setSize issue can silently corrupt application state by incorrectly resizing Lists without crashing.
Mitigation Recommendations
A fix is available in Immutable.js version 4.3.9 and later. Users should upgrade to version 4.3.9 or newer to prevent this vulnerability. The fix adds upfront validation to reject indices or sizes exceeding 2^30 with a catchable RangeError and replaces unsafe bitwise shifts with safe computations to prevent infinite loops and memory exhaustion. Until upgrading, avoid passing untrusted input as List indices or key-paths in affected methods. Patch status is confirmed by the vendor advisory indicating the fix in version 4.3.9.
Immutable.js `List` 32-bit trie overflow → unrecoverable DoS (CVE-2026-59879)
Description
Immutable.js versions prior to 4.3.9 contain a vulnerability in the List data structure where certain operations mishandle indices or sizes in the range [2^30, 2^31). This causes either an uncatchable infinite loop on empty Lists or an out-of-memory crash (process abort) on populated Lists. Additionally, a silent data corruption issue exists where setSize can wrap large values, causing incorrect List sizes without crashing. The vulnerability can be triggered remotely by unauthenticated input that controls List indices or key-paths, leading to denial of service. No confidentiality, integrity, or remote code execution impacts are present.
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
The vulnerability in Immutable.js List arises from the use of signed 32-bit bitwise arithmetic in the internal 32-wide trie implementation. Operations like set, setIn, updateIn, and setSize mishandle indices or sizes ≥ 2^30 due to JavaScript's 32-bit shift behavior causing infinite loops or heap exhaustion. On empty Lists, this results in an infinite CPU spin that cannot be caught by try/catch. On populated Lists, it causes unbounded memory allocation leading to process aborts (SIGABRT or OOM kills). The setSize method also silently corrupts List size by wrapping large values due to coercion to 32-bit integers. The root cause is a loop relying on 1 << (newLevel + SHIFT) which wraps and causes the loop to never terminate. The fix involves upfront validation to throw RangeErrors for sizes exceeding 2^30 and replacing the shift operation with a safe non-wrapping alternative. This vulnerability affects versions before 4.3.9.
Potential Impact
This vulnerability impacts availability by causing denial of service through infinite loops or process crashes when untrusted input controls List indices or key-paths. It can be triggered remotely with a small unauthenticated request. There is no impact on confidentiality, integrity, or remote code execution. The companion setSize issue can silently corrupt application state by incorrectly resizing Lists without crashing.
Mitigation Recommendations
A fix is available in Immutable.js version 4.3.9 and later. Users should upgrade to version 4.3.9 or newer to prevent this vulnerability. The fix adds upfront validation to reject indices or sizes exceeding 2^30 with a catchable RangeError and replaces unsafe bitwise shifts with safe computations to prevent infinite loops and memory exhaustion. Until upgrading, avoid passing untrusted input as List indices or key-paths in affected methods. Patch status is confirmed by the vendor advisory indicating the fix in version 4.3.9.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-v56q-mh7h-f735
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-59879"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a5fcf3c1010f89cc2151207
Added to database: 07/21/2026, 19:57:48 UTC
Last enriched: 07/21/2026, 20:35:54 UTC
Last updated: 07/21/2026, 20:57:08 UTC
Views: 2
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.