HIGH 7.5

CVE-2026-59879: Immutable.js List Operations Buffer Overflow and Denial of Service

Immutable.js, a popular JavaScript library for working with immutable data structures, contains a critical flaw in how it handles large array indices and sizes. When developers use certain list operations with indices between roughly 1 billion and 2 billion, the library either freezes indefinitely, consumes all available memory, or silently produces incorrect results. This affects versions before 4.3.9 and 5.1.8. The vulnerability poses a significant availability risk to any application relying on Immutable.js for core data management, particularly those processing user-controlled list operations at scale.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
CWE-1284, CWE-190, CWE-400, CWE-835
Affected products
1 configuration(s)
Published / Modified
2026-07-08 / 2026-07-10

NVD description (verbatim)

Immutable.js provides many Persistent Immutable data structures. Prior to 4.3.9 and 5.1.8, List#set, List#setSize, List#setIn, List#updateIn, and the functional set, setIn, and updateIn mishandle an index or size in the range 2 ** 30 to 2 ** 31 in setListBounds in src/List.js, causing an empty List to enter an uncatchable infinite loop, a populated List to allocate without bound until process abort, or setSize to silently wrap large values. This issue is fixed in versions 4.3.9 and 5.1.8.

6 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability resides in the setListBounds function within src/List.js. List#set, List#setSize, List#setIn, List#updateIn, and their functional equivalents fail to properly validate or handle index and size parameters in the range [2^30, 2^31). For empty lists, this causes an uncatchable infinite loop. For populated lists, the mishandling triggers unbounded memory allocation, leading to out-of-memory process termination. Additionally, setSize with large values can silently wrap indices, producing logically incorrect data structures without throwing an error. The root cause stems from boundary checking that does not account for the full range of JavaScript's 32-bit signed integer space in this context.

Business impact

Applications using Immutable.js face two primary risks: denial of service through process crashes or hangs, and silent data corruption. Any service accepting user input that influences list indices—such as API parameters, database queries, or configuration values—could be exploited to crash or degrade availability. In data-intensive applications (analytics, real-time processing, financial systems), silent wrapping of large indices could lead to subtle logic errors, incorrect calculations, or compliance violations if data integrity is not validated at higher layers. The lack of an exception makes detection difficult without explicit monitoring.

Affected systems

The vulnerability affects Immutable.js (immutable package on npm) versions prior to 4.3.9 in the 4.x branch and prior to 5.1.8 in the 5.x branch. Any JavaScript/Node.js application with a transitive or direct dependency on vulnerable versions is at risk. This includes frontend applications bundled with Immutable.js, backend Node.js services, and server-side rendering frameworks. The scope is wide given Immutable.js's adoption in state management libraries and data processing pipelines.

Exploitability

Exploiting this vulnerability requires the attacker to control or influence the index or size parameter passed to affected List methods. In most realistic scenarios, this demands either direct API access or the ability to submit crafted requests that manipulate list operations. The attack surface depends on application design: if indices are derived from user input (query parameters, file uploads, API payloads), exploitation is straightforward and requires no authentication. The CVSS score of 7.5 reflects the low complexity and lack of privileges required, balanced against the absence of direct confidentiality or integrity impact. However, the availability impact is severe, making this a practical threat to uptime.

Remediation

Upgrade Immutable.js to version 4.3.9 or later if using the 4.x series, or to version 5.1.8 or later if using the 5.x series. Both releases include fixes to setListBounds that properly handle large indices and sizes. Review your dependency tree to identify all direct and transitive dependencies on Immutable.js, and plan upgrades as part of your normal patching cycle. Temporarily, consider implementing application-level validation to reject list operations with indices exceeding a safe threshold (e.g., 2^20 or lower), though this is not a substitute for patching.

Patch guidance

Apply the update during your next scheduled release or maintenance window. The patch is non-breaking within each major version series. Test the upgrade in a staging environment, particularly any code paths that manipulate large lists or that accept external input for index parameters. Monitor application logs and metrics for any behavioral changes in list operations post-upgrade. If you maintain an internal npm registry or monorepo, ensure the lock files and version constraints are updated across all dependent packages.

Detection guidance

Monitor application process metrics for sudden CPU spikes, memory exhaustion, or unexpected process terminations correlated with list operations. Log or alert on List#set, List#setSize, List#setIn, and List#updateIn calls with indices or sizes in the range [2^30, 2^31). In staging, add instrumentation to detect infinite loops or unbounded allocations by measuring execution time and memory delta for these operations. Audit your codebase for any user-controlled inputs that flow into list index parameters—these are the primary attack vectors. Static analysis tools can flag suspicious patterns in Immutable.js usage.

Why prioritize this

Although this vulnerability does not yet appear in CISA's Known Exploited Vulnerabilities catalog, the availability impact and ease of exploitation warrant prompt attention. Any application exposing Immutable.js-dependent functionality to untrusted input should be prioritized for patching. For internal tools or backend services with restricted input sources, the timeline can be longer. Organizations using Immutable.js in critical data pipelines should prioritize this as high urgency due to the risk of silent data corruption.

Risk score, explained

The CVSS 3.1 score of 7.5 (HIGH) reflects: network-accessible attack vector (AV:N), low attack complexity (AC:L), no privilege or user interaction required (PR:N, UI:N), and high availability impact (A:H). The score appropriately captures the denial-of-service severity. The scoring deliberately does not penalize confidentiality or integrity because the primary disclosed impacts are availability and logic errors; however, organizations should recognize that silent data corruption (the setSize wrapping) represents a secondary integrity risk that may not be fully reflected in the availability-focused CVSS metric.

Frequently asked questions

Does this vulnerability affect production systems using Immutable.js for state management?

Yes, if your application uses an affected version and any user input or external data influences list indices or sizes, production systems are at risk. State management libraries (Redux, MobX, etc.) that depend on Immutable.js indirectly expose this risk if indices exceed the 2^30 threshold, though such large indices are uncommon in typical UI state trees.

What is the difference between the infinite loop and the memory exhaustion impact?

An infinite loop occurs when you call List#set or List#setIn on an empty list with a large index—the process hangs indefinitely. Memory exhaustion occurs when the list is already populated; the vulnerability causes allocation to grow without bounds, consuming RAM until the process crashes. Both result in service disruption, but memory exhaustion can affect other processes on the same host.

Can this vulnerability be exploited remotely?

Yes, if the application accepts network requests that influence list indices—for example, an API endpoint that creates a list entry at a user-specified position. Exploitation does not require authentication or user interaction, making it a high-impact remote denial-of-service vector.

Is upgrading from 4.3.9 to 5.1.8 recommended?

Upgrading to 5.x is a separate architectural decision. Both 4.3.9 and 5.1.8 fix this vulnerability. Choose the upgrade path based on your application's compatibility and release cycle. Verify against the vendor's migration guide if moving between major versions.

This analysis is based on publicly disclosed vulnerability data current as of the publication date. Patch version numbers and vendor guidance are derived from official advisories; verify all remediation steps against the maintainer's release notes before deployment. No active exploitation has been confirmed at the time of publication, but organizations should assess their specific use cases for risk. This vulnerability analysis does not constitute a security guarantee and should be supplemented with internal threat modeling and testing in your environment. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).