npm / immutable
immutable
What changed in immutable 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
1 breaking4 security4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initimmutable 59 changes
Breaking changes 1
On a lazy Seq of unknown size, has(index) checks whether the index exists instead of searching for a value equal to the index.
Security 4
DoS patches for CVE-2026-59879 and CVE-2026-59880 were ported onto branch 3.x.
Guards oversized bounds in setListBounds, addressing a security vulnerability affecting List.
Indexes large hash-collision buckets for faster lookups in Map.
Immutable is vulnerable to Prototype Pollution
Fixes and other changes 4
List now preserves undefined values when grown past 32 elements.
Repeat.lastIndexOf now returns size - 1 instead of size for the last index.
The type for reduce is improved when no initial value is given.
The reverseFactory iterator now reads reversedSequence.size instead of this, fixing reversed-sequence iteration behavior.