{"id":"CVE-2026-35209","published":"2026-04-06T17:26:52Z","modified":"2026-04-06T18:49:29Z","title":"defu: Prototype pollution via `__proto__` key in defaults argument","vendor":"unjs","product":"defu","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00414,"percentile":0.36422,"provenance":"source"},"cwes":[{"id":"CWE-1321","name":"Improperly Controlled Modification of Object Prototype Attributes"}],"references":[{"url":"https://github.com/unjs/defu/security/advisories/GHSA-737v-mqg7-c878","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/unjs/defu/pull/156","tags":["x_refsource_MISC"]},{"url":"https://github.com/unjs/defu/commit/3942bfbbcaa72084bd4284846c83bd61ed7c8b29","tags":["x_refsource_MISC"]},{"url":"https://github.com/unjs/defu/releases/tag/v6.1.5","tags":["x_refsource_MISC"]}],"priority":{"score":12.5,"factors":[{"name":"EPSS percentile","points":7.28},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"unjs","affectedVersions":[{"vendor":"unjs","product":"defu","versions":["< 6.1.5"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-04-06T18:49:21.516737Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"defu","vulnerableRanges":["<6.1.5"],"patched":["6.1.5"],"from":["GHSA-737v-mqg7-c878"],"provenance":"source"}],"summary":{"text":"The defu package (unjs), prior to version 6.1.5, contains a prototype pollution flaw in its recursive defaults-merging logic, where the internal _defu function copies the defaults object with Object.assign and so lets a crafted __proto__ key replace the result's prototype. An attacker who can supply input passed as the first argument to defu(), such as untrusted parsed JSON, database records, or config files, over the network without authentication or user interaction, can inject values that override intended defaults in the merged result.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:49:03Z"},"euvd":{"id":"EUVD-2026-19394","exploited":false,"provenance":"source"}}