Skip to content

defu (npm)

🌊 Assign default properties recursively

Advisories
2
Latest version
6.1.7
Released Apr 7, 2026
License
MIT
OpenSSF Scorecard
3.2 / 10

How to fix

Upgrading to 6.1.5 or later clears every advisory below that has a fix.

Upgrade commands
npm
npm install defu@6.1.7
yarn
yarn add defu@6.1.7
pnpm
pnpm add defu@6.1.7

Known vulnerabilities

AdvisorySeverityAffectedFixed in
GHSA-737v-mqg7-c878
defu: Prototype pollution via `__proto__` key in defaults argument
High
EPSS 0.40%
< 6.1.5
6.1.5
GHSA-737v-mqg7-c878
defu: Prototype pollution via `__proto__` key in defaults argument
High
EPSS 0.40%
<= 6.1.4
No fix yet

Source: git+https://github.com/unjs/defu.git

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor