Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-35209: CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in unjs defu

0
High
VulnerabilityCVE-2026-35209cvecve-2026-35209cwe-1321
Published: Mon Apr 06 2026 (04/06/2026, 17:26:52 UTC)
Source: CVE Database V5
Vendor/Project: unjs
Product: defu

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.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 04/06/2026, 17:45:30 UTC

Technical Analysis

The unjs defu library allows recursive assignment of default properties. In versions before 6.1.5, passing unsanitized user input with a __proto__ key to defu() leads to prototype pollution due to the use of Object.assign({}, defaults) in the internal _defu function. Object.assign triggers the __proto__ setter, replacing the object's prototype with attacker-controlled values. This bypasses existing __proto__ key guards and results in polluted prototypes affecting the final merged object. The fix in version 6.1.5 replaces Object.assign with object spread syntax ({ ...defaults }), which uses [[DefineOwnProperty]] and avoids invoking the __proto__ setter, mitigating the vulnerability.

Potential Impact

An attacker can manipulate the prototype of objects created by defu(), potentially altering application behavior by injecting or overriding properties inherited through the polluted prototype. The CVSS score of 7.5 (high severity) reflects that the vulnerability is remotely exploitable without privileges or user interaction, with no confidentiality impact but high integrity impact and no availability impact. There are no known exploits in the wild at this time.

Mitigation Recommendations

Upgrade to defu version 6.1.5 or later, which replaces the vulnerable Object.assign usage with object spread syntax to prevent prototype pollution. Since no official patch link or advisory is provided, users should verify the version in use and update accordingly. Patch status is not yet confirmed via vendor advisory; check the vendor's official channels for the latest remediation guidance.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-04-01T18:48:58.937Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 69d3edbe0a160ebd92cb34cc

Added to database: 4/6/2026, 5:30:38 PM

Last enriched: 4/6/2026, 5:45:30 PM

Last updated: 4/6/2026, 7:12:32 PM

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses