Advisories for Npm/Immutable package

2026

Immutable.js `List` 32-bit trie overflow → unrecoverable DoS

List#set, List#setSize, List#setIn, List#updateIn (and the functional set / setIn / updateIn) mishandle an index or size in the range [2 ** 30, 2 ** 31): On an empty List the operation enters an uncatchable infinite loop (a tight CPU spin; a surrounding try/catch never regains control). Only killing the worker recovers it. On a populated List (≥ 32 elements — i.e. any array of ≥ 32 items turned into …

Immutabl: Hash-collision algorithmic complexity denial of service in Immutable.Map/Set

Immutable.Map and Immutable.Set keep keys that share the same 32-bit hash in a collision bucket that is scanned linearly. The string hash is public and deterministic, so an attacker who controls the keys inserted into a Map can craft many keys that all collide, degrading insertion and lookup from amortized O(1) to O(n) per operation — and O(n²) to build or read the whole set. A small, attacker-shaped payload can …