CVE-2026-35209
HIGH 7.5CVSS 3.1defu: Prototype pollution via `__proto__` key in defaults argument
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.
- Published
- 6 Apr 2026
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-1321
- Also known as
- GHSA-737v-mqg7-c878
- Sources
- NVDJSONOSV GHSA-737v-mqg7-c878JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | unjs | defucpe:2.3:a:unjs:defu:*:*:*:*:*:node.js:*:* |
< 6.1.5 | 6.1.5 |
| OSV | npm | defu | < 6.1.5 | 6.1.5 |
References
- https://github.com/unjs/defu/commit/3942bfbbcaa72084bd4284846c83bd61ed7c8b29 · Patch, WEB
- https://github.com/unjs/defu/pull/156 · Issue Tracking, Patch, WEB
- https://github.com/unjs/defu/releases/tag/v6.1.5 · Release Notes, WEB
- https://github.com/unjs/defu/security/advisories/GHSA-737v-mqg7-c878 · Mitigation, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-35209 · ADVISORY
- https://github.com/unjs/defu · PACKAGE
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 6 Apr 2026)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 4 Apr 2026)