<?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 &lt; 4.3.9 - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/immutable.js--4.3.9/</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 18:39:19 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/immutable.js--4.3.9/feed.xml" rel="self" type="application/rss+xml"/><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>