<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Immutable-Js - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/immutable-js/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 21 Jul 2026 19:05:11 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/immutable-js/feed.xml" rel="self" type="application/rss+xml"/><item><title>Immutable.js Map/Set Hash Collision Denial of Service Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2026-07-immutable-map-hash-collision-dos/</link><pubDate>Tue, 21 Jul 2026 19:05:11 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-immutable-map-hash-collision-dos/</guid><description>A high-severity algorithmic complexity vulnerability (CVE-2026-59880) in the Immutable.js library's `Immutable.Map` and `Immutable.Set` allows an attacker to craft object keys that cause hash collisions, degrading performance from O(1) to O(N²) and leading to a CPU-bound denial of service in applications, particularly those running on single-threaded Node.js environments that ingest untrusted input as object keys.</description><content:encoded><![CDATA[<p>A high-severity algorithmic complexity vulnerability, identified as CVE-2026-59880, affects all versions of the Immutable.js library through 5.1.7, specifically within its <code>Immutable.Map</code> and <code>Immutable.Set</code> data structures. Threat actors can exploit this by crafting malicious input where object keys are designed to produce identical 32-bit hash values according to Immutable.js's deterministic string hashing algorithm. When these keys are inserted into or looked up within <code>Immutable.Map</code> or <code>Immutable.Set</code>, the collision resolution mechanism - a linear scan of a collision bucket - causes operations to degrade from an amortized O(1) to O(N) for single operations and O(N²) for building or reading the entire set. This disproportionately consumes CPU resources, leading to a CPU-bound denial of service, particularly impactful for single-threaded JavaScript runtimes like Node.js, which can cause the application's event loop to stall and render the service unavailable. The vulnerability primarily affects applications that ingest untrusted user input (e.g., from request bodies) and use it directly as object keys within Immutable.js structures.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li><strong>Reconnaissance</strong>: An attacker identifies a target application utilizing the Immutable.js library and determines that it processes untrusted user input, such as HTTP request bodies, directly into <code>Immutable.Map</code> or <code>Immutable.Set</code> structures.</li>
<li><strong>Algorithm Analysis</strong>: The attacker analyzes the Immutable.js deterministic string hashing algorithm (JVM-style polynomial <code>hashed = (31 * hashed + charCode) | 0</code>) to understand how hash collisions can be engineered.</li>
<li><strong>Payload Crafting</strong>: Using the deterministic hashing algorithm, the attacker generates a large set of distinct string keys that all produce the same 32-bit hash value. For example, strings like &quot;Aa&quot; and &quot;BB&quot; hash to the same value (2112), allowing for exponential growth in colliding keys with minimal length.</li>
<li><strong>Initial Access / Delivery</strong>: The attacker sends a crafted payload, typically as a JSON object within an HTTP POST request body, to the vulnerable application endpoint. The crafted strings are used as keys in this JSON object.</li>
<li><strong>Processing</strong>: The application receives the request and attempts to parse the untrusted input, initializing an <code>Immutable.Map</code> or <code>Immutable.Set</code> (e.g., via <code>Immutable.Map(req.body)</code> or <code>Immutable.fromJS(req.body)</code>) using the attacker-controlled keys.</li>
<li><strong>Resource Consumption</strong>: As the application inserts or accesses these colliding keys, the Immutable.js data structures are forced to perform linear scans within their collision buckets. This degrades performance to O(N²) time complexity for processing the entire set of keys.</li>
<li><strong>Denial of Service</strong>: The excessive CPU consumption caused by the inefficient algorithmic operations leads to a CPU-bound denial of service. In single-threaded runtimes like Node.js, this stalls the event loop, preventing the application from processing legitimate requests and rendering it unresponsive.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2026-59880 results in a severe CPU-bound denial of service for affected applications. This can lead to complete service unavailability, preventing legitimate users from accessing the application's functionalities. The impact is particularly critical for applications built on single-threaded runtimes such as Node.js, where a single malicious request can stall the entire event loop, bringing the application to a halt. While no specific victim counts or industry targets are provided, any application using <code>Immutable.js</code> versions prior to <code>5.1.8</code> and ingesting untrusted input directly into <code>Immutable.Map</code> or <code>Immutable.Set</code> is susceptible. The vulnerability causes the server to consume disproportionate CPU resources, wasting computational cycles and potentially incurring higher infrastructure costs due to auto-scaling or prolonged unavailability.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li><strong>Patch Vulnerable Libraries</strong>: Immediately upgrade the <code>Immutable.js</code> library to version <code>5.1.8</code> or newer to remediate CVE-2026-59880. This version introduces a per-process seeded secondary hash to handle large collision buckets efficiently.</li>
<li><strong>Implement Input Validation</strong>: For applications that cannot be immediately patched, implement strict input validation to cap request body size and limit the number and length of object keys processed from untrusted sources, thereby preventing attacker-controlled payloads from reaching <code>Immutable.Map</code> or <code>Immutable.Set</code>.</li>
<li><strong>Avoid Direct Key Ingestion</strong>: Review application code to identify instances where untrusted data, especially object keys from sources like <code>req.body</code>, are directly used to construct <code>Immutable.Map</code> or <code>Immutable.Set</code> and implement sanitization or alternative processing.</li>
</ul>
]]></content:encoded><category domain="severity">low</category><category domain="type">advisory</category><category>denial-of-service</category><category>algorithmic-complexity</category><category>immutable-js</category><category>nodejs</category><category>vulnerability</category></item><item><title>Immutable.js List 32-bit Trie Overflow Leads to Denial of Service</title><link>https://feed.craftedsignal.io/briefs/2026-07-immutable-js-dos/</link><pubDate>Tue, 21 Jul 2026 18:39:19 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-immutable-js-dos/</guid><description>A vulnerability in Immutable.js List methods (`#set`, `#setSize`, `#setIn`, `#updateIn`) allows a remote, unauthenticated attacker to trigger an infinite loop or heap exhaustion by providing a crafted numeric string index in the range `[2 ** 30, 2 ** 31)`. This leads to an unrecoverable Denial of Service (DoS) by causing a tight CPU spin or process abortion, with an additional silent data corruption issue in `setSize`. This vulnerability impacts application availability but not confidentiality or integrity, and can be triggered by a single small HTTP request.</description><content:encoded><![CDATA[<p>A high-severity vulnerability (CVE-2026-59879) has been discovered in the <code>immutable.js</code> library, affecting versions <code>&lt; 4.3.9</code> and <code>&gt;= 5.0.0-beta.1, &lt; 5.1.8</code>. This flaw allows a remote, unauthenticated attacker to cause a Denial of Service (DoS) in applications that use <code>immutable.js</code> by supplying specific numeric string inputs to <code>List#set</code>, <code>List#setSize</code>, <code>List#setIn</code>, or <code>List#updateIn</code> methods. Specifically, an index in the range <code>[2 ** 30, 2 ** 31)</code> can trigger an uncatchable infinite loop on an empty <code>List</code> (leading to a tight CPU spin) or unbounded memory allocation on a populated <code>List</code> (causing heap exhaustion and process abortion). The vulnerability is rooted in incorrect signed 32-bit bitwise arithmetic handling within <code>setListBounds()</code> and can be triggered via a single, small HTTP request body, URL parameter, or key-path, impacting application availability. Additionally, a companion silent data corruption issue in <code>setSize</code> can lead to incorrect application state.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An unauthenticated attacker crafts a small HTTP request, embedding a numeric string (e.g., <code>1073741824</code>) in the range <code>[2 ** 30, 2 ** 31)</code> into a request body, URL, or key-path.</li>
<li>The vulnerable application, using <code>immutable.js</code> versions <code>&lt; 4.3.9</code> or <code>&gt;= 5.0.0-beta.1, &lt; 5.1.8</code>, receives this request.</li>
<li>The application processes the untrusted input, passing the crafted numeric string as an index to <code>List#set</code>, <code>List#setSize</code>, <code>List#setIn</code>, or <code>List#updateIn</code>.</li>
<li>Within <code>immutable.js</code>, the <code>setListBounds()</code> function attempts to handle the index using signed 32-bit bitwise arithmetic.</li>
<li>Due to a bug where JavaScript's shift count is taken modulo 32, the level-raising loop condition <code>newTailOffset &gt;= 1 &lt;&lt; (newLevel + SHIFT)</code> becomes perpetually true.</li>
<li>If the <code>List</code> is empty, this results in an uncatchable infinite CPU spin, freezing the worker process.</li>
<li>If the <code>List</code> is populated (e.g., from an array with &gt;= 32 elements), each iteration of the loop allocates a new <code>VNode</code> without bound, rapidly exhausting the process heap.</li>
<li>Heap exhaustion leads to the application process aborting (e.g., <code>SIGABRT</code>, exit <code>134</code>, or kernel OOM-kill <code>137</code>), causing a Denial of Service.</li>
<li>Alternatively, if <code>setSize</code> is called with a large value like <code>2 ** 31</code> or <code>2 ** 32 + 5</code>, silent wraparound due to <code>ToInt32</code> coercion can corrupt the <code>List</code>'s size to 0 or 5 respectively, leading to data corruption without crashing.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This vulnerability primarily impacts the availability of applications using vulnerable versions of <code>immutable.js</code>. A single, small, unauthenticated HTTP request can trigger an unrecoverable Denial of Service (DoS) by either causing a worker process to enter an infinite CPU spin, effectively hanging, or by forcing the process to consume all available memory, leading to an application crash (e.g., <code>SIGABRT</code> or OOM-kill). This can affect common application patterns such as configuration stores, document/collection editors, Redux-Immutable reducers, or JSON-Patch endpoints that route untrusted input into <code>List</code> operations. There is no observed impact on confidentiality or integrity, nor does it lead to Remote Code Execution (RCE). The companion silent data corruption issue can lead to applications operating with incorrect state, potentially causing further malfunctions, but without an immediate crash.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li><strong>Upgrade immutable.js:</strong> Immediately upgrade <code>immutable.js</code> to version <code>4.3.9</code> or higher, or to <code>5.1.8</code> or higher for the v5 beta releases, to remediate CVE-2026-59879.</li>
<li><strong>Implement Input Validation:</strong> For systems that cannot be immediately upgraded, validate and clamp any externally supplied <code>List</code> index or <code>setIn</code>/<code>updateIn</code> key-path segments. Reject numeric path segments greater than or equal to <code>2 ** 30</code> before passing them to <code>immutable.js</code> methods.</li>
<li><strong>Containerize and Resource Limit Applications:</strong> Run request handling processes in isolated worker environments with resource limits (e.g., cap heap size using <code>--max-old-space-size</code>) to contain any potential process aborts, allowing for faster recovery or restart of affected workers.</li>
</ul>
]]></content:encoded><category domain="severity">low</category><category domain="type">advisory</category><category>denial-of-service</category><category>vulnerability</category><category>javascript</category><category>npm</category><category>immutable-js</category></item></channel></rss>