CVE-2026-35209

defu: Prototype pollution via `__proto__` key in defaults argument

HIGH
7.5
CVSS Score
Published: April 6, 2026 at 05:26 PM UTC
Updated: July 21, 2026 at 07:26 PM UTC
1 product affected across 1 vendorDefu

Using defu by unjs?

Get instant alerts when new vulnerabilities affect defu - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.5
Exploit prediction
EPSS 0.4%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 6.1.5
Affected range stops below 6.1.5, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (4)

x_refsource_CONFIRMMitigationVendor Advisory
Source: cverecord
https://github.com/unjs/defu/security/advisories/GHSA-737v-mqg7-c878
x_refsource_MISCIssue TrackingPatch
Source: cverecord
https://github.com/unjs/defu/pull/156
x_refsource_MISCRelease Notes
Source: cverecord
https://github.com/unjs/defu/releases/tag/v6.1.5

SSVC — Action Prioritization

SSVCNo known exploitAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.5HIGHGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-1321

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card