CVE-2026-137088 in deep-merge
Summary
by MITRE • 11/25/2026
@oleksii-pavlov/deep-merge before 1.2.4 contains a prototype pollution vulnerability in deepMergeTwoAssignable() that allows remote attackers to modify Object.prototype by supplying a __proto__ key. Attackers can pass JSON-parsed input to deepMerge(), deepMergeAndAssign(), deepUpdate() or deepUpdateAndAssign() to inject inherited properties, causing logic bypass or denial of service.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/25/2026
The vulnerability identified in @oleksii-pavlov/deep-merge versions prior to 1.2.4 represents a critical security flaw rooted in improper handling of object property assignment during deep merging operations. This issue is classified as Prototype Pollution, corresponding to CWE-1325 within the Common Weakness Enumeration framework. The core technical deficiency lies within the internal function deepMergeTwoAssignable(), which fails to adequately validate or sanitize keys before assigning them to target objects. Specifically, when an attacker supplies a JSON-parsed input containing a _proto_ key, the library incorrectly interprets this as a standard property name rather than recognizing it as a reference to the object's prototype chain. This oversight allows external data to directly modify Object.prototype, effectively polluting the global prototype of all JavaScript objects within the application environment.
The operational impact of this vulnerability is severe and multifaceted, affecting both confidentiality and availability depending on the specific exploitation context. By injecting inherited properties through _proto_, an attacker can alter the behavior of existing functions or introduce malicious methods that are automatically available to every object in the runtime. This capability facilitates logic bypasses where security checks relying on standard property existence may be circumvented because the polluted prototype introduces unexpected attributes. Furthermore, if the pollution involves recursive structures or excessively deep nesting during the merge process, it can lead to stack overflow errors resulting in a denial of service condition for the hosting application. The vulnerability is particularly dangerous because it leverages JSON parsing, which is commonly used in web applications and APIs, making it accessible via remote network requests without requiring authentication if input validation is not enforced at higher layers.
Mitigation strategies must focus on immediate version updates and defensive coding practices. The primary remediation step is to upgrade the @oleksii-pavlov/deep-merge package to version 1.2.4 or later, where this prototype pollution vector has been addressed through improved key validation mechanisms that prevent _proto_ from being treated as a mergeable property. For applications unable to update immediately due to dependency constraints, developers should implement input sanitization layers that strip out dangerous keys such as _proto_, constructor, and prototype before passing data into deep merging functions. Additionally, utilizing Object.freeze on critical configuration objects or employing libraries with built-in protection against prototype pollution can provide an additional layer of defense. It is also advisable to audit the use of JSON.parse in conjunction with deep merge operations to ensure that untrusted input does not reach these sensitive internal functions without prior validation.
From a threat intelligence perspective, this vulnerability aligns with ATT&CK technique T1508, which covers Exploitation for Defense Evasion through prototype pollution. Attackers often utilize such flaws to establish persistence or escalate privileges within JavaScript-based environments by modifying global objects like Array.prototype or Object.prototype. The ability to inject properties into the prototype chain allows adversaries to manipulate application logic in ways that are difficult to detect using standard logging mechanisms, as the changes occur at a fundamental level of object instantiation. Security teams should monitor for unusual patterns in JSON payload structures and ensure that all third-party dependencies are regularly audited against known vulnerability databases such as NVD or Snyk to maintain a robust security posture against similar prototype pollution risks prevalent in modern JavaScript ecosystems.