CVE-2026-35209 Details
Description
defu is software that allows uers to assign default properties recursively. Prior to version 6.1.5, applications that pass unsanitized user input (e.g. parsed JSON request bodies, database records, or config files from untrusted sources) as the first argument to `defu()` are vulnerable to prototype pollution. A crafted payload containing a `__proto__` key can override intended default values in the merged resul. The internal `_defu` function used `Object.assign({}, defaults)` to copy the defaults object. `Object.assign` invokes the `__proto__` setter, which replaces the resulting object's `[[Prototype]]` with attacker-controlled values. Properties inherited from the polluted prototype then bypass the existing `__proto__` key guard in the `for...in` loop and land in the final result. Version 6.1.5 replaces `Object.assign({}, defaults)` with object spread (`{ ...defaults }`), which uses `[[DefineOwnProperty]]` and does not invoke the `__proto__` setter.
A prototype pollution vulnerability has been identified in the Defu library, affecting versions through 6.1.4. The issue arises when applications pass unsanitized user input, such as parsed JSON request bodies or database records, as the first argument to the Defu function. A crafted payload containing a '__proto__' key can manipulate default values in the merged result. The vulnerability exploits the internal '_defu' function, which originally used 'Object.assign' to copy default properties. This method triggers the '__proto__' setter, allowing attacker-controlled values to overwrite the object's prototype, bypassing safeguards and altering the final output.
Users can upgrade to Defu version 6.1.5 or later, where this vulnerability has been patched by changing the method of copying default properties to a technique that does not invoke the '__proto__' setter.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 6, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/unjs/defu/commit/3942bfbbcaa72084bd4284846c83bd61ed7c8b29 | [email protected] | Patch |
| https://github.com/unjs/defu/pull/156 | [email protected] | Issue TrackingPatch |
| https://github.com/unjs/defu/releases/tag/v6.1.5 | [email protected] | Release Notes |
| https://github.com/unjs/defu/security/advisories/GHSA-737v-mqg7-c878 | [email protected] | MitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-1321 | Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| unjs defu | < 6.1.5 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 21, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 27, 2026 | Initial Analysis | [email protected] |
| Apr 6, 2026 | New CVE Received | [email protected] |