CVE-2026-35209 defu: Prototype pollution via `__proto__` key in defaults argument

High 7.5 Published Updated

Prototype pollution in defu allows attackers to override default values via crafted input, potentially leading to code execution or security bypasses.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-35209?

CVE-2026-35209 is a high-severity vulnerability in unjs defu, published on 6 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-1321

Which versions are affected by CVE-2026-35209?

2 open source packages ship an affected version, including defu. It affects 1 product.

PackageAffectedFixed in
defu npmAll versions6.1.5
defu npmAll versions6.1.5

Products include Unjs Defu.

How do I fix CVE-2026-35209?

Upgrade defu to 6.1.5 or later.

Is CVE-2026-35209 being exploited?

There is no known exploitation of CVE-2026-35209 in the wild and no public exploit code.

Sources

Also known as CLEANSTART-2026-IE76846, CLEANSTART-2026-KZ86783, CLSA-2026-1780879894, CLSA-2026-1784596329, GHSA-737v-mqg7-c878, MINI-2f5m-5j4r-jgq5 and 3 more.

Is CVE-2026-35209 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free