CVE-2026-29063 Overview
CVE-2026-29063 is a Prototype Pollution vulnerability affecting Immutable.js, a popular JavaScript library that provides Persistent Immutable data structures. The vulnerability exists in several core APIs including mergeDeep(), mergeDeepWith(), merge(), Map.toJS(), and Map.toObject(). Attackers can exploit these functions to pollute the prototype chain of JavaScript objects, potentially leading to unauthorized data access, denial of service, or in some cases, remote code execution depending on the application context.
Critical Impact
Prototype Pollution in Immutable.js can allow attackers to modify object prototypes via vulnerable merge and conversion APIs, potentially compromising application security and data integrity across the entire JavaScript runtime.
Affected Products
- Immutable.js versions prior to 3.8.3
- Immutable.js versions 4.x prior to 4.3.7
- Immutable.js versions 5.x prior to 5.1.5
Discovery Timeline
- 2026-03-06 - CVE-2026-29063 published to NVD
- 2026-03-09 - Last updated in NVD database
Technical Details for CVE-2026-29063
Vulnerability Analysis
This vulnerability is classified as CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes). Prototype Pollution occurs when an attacker can inject properties into JavaScript object prototypes through unsafe object operations. In the case of Immutable.js, the affected APIs fail to properly sanitize keys during deep merge operations and object conversions, allowing malicious payloads containing __proto__ or constructor.prototype to pollute the base Object prototype.
The network-accessible attack vector with no privileges required makes this vulnerability particularly concerning for applications that process untrusted user input through these Immutable.js APIs. When user-controlled data flows into mergeDeep(), mergeDeepWith(), merge(), Map.toJS(), or Map.toObject() without proper sanitization, an attacker can modify the prototype chain of all JavaScript objects in the application runtime.
Root Cause
The root cause lies in insufficient validation of object keys during recursive merge operations and object conversion processes. The vulnerable functions do not properly check for dangerous prototype-related properties such as __proto__, constructor, or prototype before performing assignments. This allows specially crafted nested objects to traverse up the prototype chain and inject malicious properties that affect all objects inheriting from the polluted prototype.
Attack Vector
The attack vector for this vulnerability involves submitting maliciously crafted nested objects to applications using the vulnerable Immutable.js APIs. An attacker can exploit this by sending JSON payloads containing prototype pollution gadgets such as {"__proto__": {"polluted": true}} or {"constructor": {"prototype": {"polluted": true}}}. When processed by the vulnerable mergeDeep() or similar functions, these payloads modify the base Object prototype, potentially affecting application logic, bypassing security checks, or enabling further exploitation depending on how the application uses object properties.
The vulnerability mechanism can be understood by examining how the affected functions handle nested object structures. When processing input without proper key sanitization, the merge operations traverse object hierarchies and assign values at each level. By targeting special properties like __proto__, attackers can redirect these assignments to pollute shared prototypes. For detailed technical analysis, refer to the GitHub Security Advisory GHSA-wf6x-7x77-mvgw.
Detection Methods for CVE-2026-29063
Indicators of Compromise
- Unexpected properties appearing on JavaScript objects that were not explicitly defined
- Application behavior changes indicating prototype chain modifications
- HTTP requests or API calls containing __proto__, constructor.prototype, or similar prototype pollution payloads in JSON bodies
- Unusual object property access patterns in application logs
Detection Strategies
- Implement static analysis scanning to identify usage of vulnerable Immutable.js versions and affected API calls (mergeDeep(), mergeDeepWith(), merge(), Map.toJS(), Map.toObject())
- Deploy web application firewall (WAF) rules to detect and block requests containing prototype pollution attack patterns in JSON payloads
- Use software composition analysis (SCA) tools to inventory Immutable.js dependencies and flag versions prior to 3.8.3, 4.3.7, or 5.1.5
- Monitor application runtime for prototype modifications using Object.freeze() or Object.seal() on critical prototypes as canaries
Monitoring Recommendations
- Enable verbose logging on API endpoints that process user-provided JSON data to capture suspicious payloads
- Implement runtime monitoring to detect unexpected modifications to Object.prototype or other base prototypes
- Set up alerts for dependency vulnerability scanners when new prototype pollution CVEs are published affecting JavaScript libraries
How to Mitigate CVE-2026-29063
Immediate Actions Required
- Update Immutable.js to patched versions: 3.8.3 for the 3.x branch, 4.3.7 for the 4.x branch, or 5.1.5 for the 5.x branch
- Audit application code to identify all usages of the vulnerable APIs: mergeDeep(), mergeDeepWith(), merge(), Map.toJS(), and Map.toObject()
- Implement input validation to sanitize user-controlled data before passing to Immutable.js APIs, specifically blocking __proto__ and constructor keys
- Run dependency vulnerability scans across all projects to identify affected Immutable.js versions
Patch Information
The Immutable.js maintainers have released security patches addressing this vulnerability across all supported version branches. Organizations should upgrade to the appropriate patched version based on their current deployment:
For additional details on the vulnerability and remediation, consult the GitHub Security Advisory GHSA-wf6x-7x77-mvgw.
Workarounds
- Implement a sanitization layer to recursively remove __proto__, constructor, and prototype keys from user input before processing with Immutable.js
- Use Object.freeze(Object.prototype) at application startup to prevent prototype modifications (note: this may break some libraries)
- Wrap vulnerable API calls with validation functions that reject objects containing dangerous keys
# Configuration example - Update Immutable.js via npm
npm update immutable@5.1.5
# Or for specific version branches:
npm install immutable@3.8.3 # For 3.x branch
npm install immutable@4.3.7 # For 4.x branch
npm install immutable@5.1.5 # For 5.x branch
# Audit for vulnerable dependencies
npm audit
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


