Описание
Immutable is vulnerable to Prototype Pollution
Impact
What kind of vulnerability is it? Who is impacted?
A Prototype Pollution is possible in immutable via the mergeDeep(), mergeDeepWith(), merge(), Map.toJS(), and Map.toObject() APIs.
Affected APIs
| API | Notes |
|---|---|
mergeDeep(target, source) | Iterates source keys via ObjectSeq, assigns merged[key] |
mergeDeepWith(merger, target, source) | Same code path |
merge(target, source) | Shallow variant, same assignment logic |
Map.toJS() | object[k] = v in toObject() with no __proto__ guard |
Map.toObject() | Same toObject() implementation |
Map.mergeDeep(source) | When source is converted to plain object |
Patches
Has the problem been patched? What versions should users upgrade to?
| major version | patched version |
|---|---|
| 3.x | 3.8.3 |
| 4.x | 4.3.7 |
| 5.x | 5.1.5 |
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
- Validate user input
- Node.js flag --disable-proto
- Lock down built-in objects
- Avoid lookups on the prototype
- Create JavaScript objects with null prototype
Proof of Concept
PoC 1 — mergeDeep privilege escalation
PoC 2 — All affected APIs
Verified output against immutable@5.1.4:
References
Are there any links users can visit to find out more?
Ссылки
- https://github.com/immutable-js/immutable-js/security/advisories/GHSA-wf6x-7x77-mvgw
- https://nvd.nist.gov/vuln/detail/CVE-2026-29063
- https://github.com/immutable-js/immutable-js/issues/2178
- https://github.com/immutable-js/immutable-js/commit/16b3313fdf2c5f579f10799e22869f6909abf945
- https://github.com/immutable-js/immutable-js/commit/6e2cf1cfe6137e72dfa48fc2cfa8f4d399d113f9
- https://github.com/immutable-js/immutable-js/commit/6ed4eb626906df788b08019061b292b90bc718cb
- https://github.com/immutable-js/immutable-js/releases/tag/v3.8.3
- https://github.com/immutable-js/immutable-js/releases/tag/v4.3.8
- https://github.com/immutable-js/immutable-js/releases/tag/v5.1.5
Пакеты
immutable
>= 4.0.0-rc.1, < 4.3.8
4.3.8
immutable
>= 5.0.0, < 5.1.5
5.1.5
immutable
< 3.8.3
3.8.3
Связанные уязвимости
Immutable.js provides many Persistent Immutable data structures. Prior to versions 3.8.3, 4.3.7, and 5.1.5, Prototype Pollution is possible in immutable via the mergeDeep(), mergeDeepWith(), merge(), Map.toJS(), and Map.toObject() APIs. This issue has been patched in versions 3.8.3, 4.3.7, and 5.1.5.
Immutable.js provides many Persistent Immutable data structures. Prior to versions 3.8.3, 4.3.7, and 5.1.5, Prototype Pollution is possible in immutable via the mergeDeep(), mergeDeepWith(), merge(), Map.toJS(), and Map.toObject() APIs. This issue has been patched in versions 3.8.3, 4.3.7, and 5.1.5.
Immutable.js provides many Persistent Immutable data structures. Prior ...