CVE-2026-35209 json
defu: Prototype pollution via `__proto__` key in defaults argument
published 2026-04-04 7 mo ago modified 2026-09-10 1 mo ago also GHSA-737v-mqg7-c878 , EUVD-2026-19394
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 34%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm defu 6.1.5
- unjs defu 6.1.5
- github.com/unjs/defu@3942bfb commit
- github.com/unjs/defu#156 pull request
- github.com/unjs/defu/releases/tag/v6.1.5 release
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 7 mo ago
Exploit prediction
0.40% chance of exploitation in the next 30 days, higher than 34% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | defu | <6.1.5 |
6.1.5 |
Affected products
- unjs defu
Classification
- Weakness
-
- CWE-1321 Improperly Controlled Modification of Object Prototype Attributes
References
-
github.com
/unjs/defu/pull/156
web, issue-tracking, patch
-
github.com
/unjs/defu/commit/3942bfbbcaa72084bd4284846c83bd61ed7c8b29
web, patch
-
github.com
/unjs/defu/security/advisories/GHSA-737v-mqg7-c878
web, mitigation, vendor-advisory
-
github.com
/unjs/defu/releases/tag/v6.1.5
web, release-notes
-
nvd.nist.gov
/vuln/detail/CVE-2026-35209
advisory
-
github.com
/unjs/defu
package
Sources
- CVE List CVE-2026-35209
- GitHub Advisory GHSA-737v-mqg7-c878
- NVD CVE-2026-35209
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.