Executive brief
A vulnerability in the Immutable.js library, commonly used for managing data in web applications, can allow an attacker to crash a server or cause it to stop responding. By sending a specially crafted request containing a large index number, an attacker can trigger an infinite loop or memory exhaustion. This results in a denial-of-service (DoS) condition, potentially taking down websites or services that process untrusted user input using this library.
Technical details
A vulnerability exists in Immutable.js 'List' operations (set, setSize, setIn, updateIn) due to the use of signed 32-bit bitwise arithmetic in the trie-based storage logic. When an index or size in the range [2^30, 2^31) is provided, the level-raising loop in 'setListBounds' encounters an integer overflow where the shift count (mod 32) causes the comparison to wrap, resulting in an infinite loop. On populated lists, this loop continuously allocates memory, leading to heap exhaustion and a process abort (SIGABRT/OOM-kill). The vulnerability can be triggered remotely if an application passes untrusted user input (like a numeric string from a URL or request body) directly into a List index or key-path. Patches are available in versions 4.3.9 and 5.1.8.
Affected products
- Immutable.js immutable < 4.3.9, >= 5.0.0-beta.1, < 5.1.8
Timeline
- 2026-06-25: disclosed
- 2026-07-08: advisory: NVD publication
- 2026-07-21: patched: GitHub Advisory updated with patch information
References
- https://api.github.com/users/mateuszismyname
- https://github.com/mateuszismyname
- https://api.github.com/users/mateuszismyname/gists%7B/gist_id%7D
- https://api.github.com/users/mateuszismyname/repos
- https://avatars.githubusercontent.com/u/108668436?v=4
- https://api.github.com/users/mateuszismyname/events%7B/privacy%7D