Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Network vector and no privileges required reflect worst-case API exposure; limited C/I/A impact consistent with prototype pollution's indirect, application-dependent consequences.
Primary rating from Vendor (https://github.com/phun-ky/defaults-deep).
CVSS VectorVendor: https://github.com/phun-ky/defaults-deep
Lifecycle Timeline
3DescriptionCVE.org
Impact
A prototype pollution vulnerability exists in @phun-ky/defaults-deep prior to version 2.0.5.
The library recursively merged user-supplied objects without filtering unsafe property names such as __proto__, constructor, and prototype. An attacker able to supply crafted input could cause properties to be written to Object.prototype, resulting in prototype pollution affecting all objects within the running process.
Applications that pass untrusted input to defaultsDeep() may be impacted. Depending on how the application uses merged objects, this could lead to unexpected behavior, logic bypasses, denial of service, or other security issues.
Patches
This issue has been fixed in version 2.0.5.
Users should upgrade to version 2.0.5 or later.
The fix prevents unsafe prototype-related keys (__proto__, constructor, and prototype) from being processed during recursive merge operations and includes regression tests covering known prototype pollution vectors.
Workarounds
Users unable to upgrade should ensure that untrusted input is sanitized before being passed to defaultsDeep().
At a minimum, applications should reject or remove the following property names from all levels of user-controlled objects:
__proto__constructorprototype
Upgrading to a patched version remains the recommended mitigation.
AnalysisAI
Prototype pollution in @phun-ky/defaults-deep prior to version 2.0.5 allows remote unauthenticated attackers to write arbitrary properties to Object.prototype by supplying crafted objects containing keys such as __proto__, constructor, or prototype to the defaultsDeep() function. The root cause is that the library performed recursive object merging without filtering these special property names, enabling full process-wide prototype chain manipulation. No public exploit code or CISA KEV listing has been identified at time of analysis, but the attack class is well-understood and exploitation is straightforward wherever untrusted input reaches the affected function.
Technical ContextAI
CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes) describes the root cause: the defaultsDeep() function in @phun-ky/defaults-deep (npm package, CPE pkg:npm/@phun-ky_defaults-deep) recursively traverses and merges source objects into a target without sanitizing property names at any depth level. JavaScript's prototype chain means that assigning to target['__proto__']['x'] = value writes to Object.prototype, making the property 'x' visible on every subsequently created plain object in the same V8 process. The same effect can be achieved via the 'constructor' and 'prototype' keys. This pattern is a known class of vulnerabilities in deep-merge utility libraries (e.g., the historical lodash, merge, and jQuery incidents), and the fix - confirmed in the PR diff at commit 807dba9 - adds an explicit blocklist guard for these three key names during recursive traversal.
RemediationAI
Upgrade @phun-ky/defaults-deep to version 2.0.5 or later, which is the vendor-confirmed fixed release available at https://github.com/phun-ky/defaults-deep/releases/tag/2.0.5 and patched via commit 807dba930f8718f9126cad59d949b8fd3539b059. For teams unable to upgrade immediately, the vendor-recommended workaround is to sanitize all untrusted input before passing it to defaultsDeep() by recursively removing or rejecting object keys named __proto__, constructor, and prototype at every nesting level. Note that this workaround is operationally fragile - incomplete traversal depth or missed input vectors will leave the application exposed - so patching to 2.0.5 is strongly preferred. No additional compensating controls (WAF rules, network restrictions) are effective against this vulnerability class since it is a library-level API contract issue, not a network protocol flaw.
More in Prototype Pollution
View allPrototype pollution in Adobe Acrobat Reader versions 24.001.30356, 26.001.21367 and earlier enables arbitrary code execu
Prototype pollution in the farinspace Partners WordPress plugin (versions up to and including 0.2.0) enables remote unau
Prototype pollution vulnerability in 'deephas' versions 1.0.0 through 1.0.5 allows attacker to cause a denial of service
A Prototype Pollution issue in Cronvel Tree-kit v.0.7.4 and before allows a remote attacker to execute arbitrary code vi
A Prototype Pollution issue in Aliconnect /sdk v.0.0.6 allows an attacker to execute arbitrary code via the aim function
All versions of the package safe-eval are vulnerable to Prototype Pollution via the safeEval function, due to improper s
This affects the package vm2 before 3.9.4 via a Prototype Pollution attack vector, which can lead to execution of arbitr
Prototype Pollution in chargeover redoc v2.0.9-rc.69 allows attackers to execute arbitrary code or cause a Denial of Ser
alizeait unflatto <= 1.0.2 was discovered to contain a prototype pollution via the method exports.unflatto at /dist/inde
A vulnerability exists in the 'dagre-d3-es' Node.js package version 7.0.9, specifically within the 'bk' module's addConf
A Prototype Pollution vulnerability in the util-deps.addFileDepend function of magix-combine-ex versions thru 1.2.10 all
Chartist 1.x through 1.3.0 allows Prototype Pollution via the extend function. Rated critical severity (CVSS 9.8), this
Same technique Denial Of Service
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-51592
GHSA-mj3g-7xcc-x4vh