Skip to content

chore(deps): update dependency defu to v6.1.5 [security] - #173

Merged
renovate[bot] merged 1 commit into
mainfrom
renovate/npm-defu-vulnerability
Apr 8, 2026
Merged

chore(deps): update dependency defu to v6.1.5 [security]#173
renovate[bot] merged 1 commit into
mainfrom
renovate/npm-defu-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
defu 6.1.46.1.5 age confidence

GitHub Vulnerability Alerts

CVE-2026-35209

Impact

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 result:

import { defu } from 'defu'

const userInput = JSON.parse('{"__proto__":{"isAdmin":true}}')
const config = defu(userInput, { isAdmin: false })

config.isAdmin // true — attacker overrides the server default

Root Cause

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.

Fix

Replace Object.assign({}, defaults) with object spread ({ ...defaults }), which uses [[DefineOwnProperty]] and does not invoke the __proto__ setter.

Affected Versions

<= 6.1.4

Credits

Reported by @​BlackHatExploitation


Release Notes

unjs/defu (defu)

v6.1.5

Compare Source

compare changes

🩹 Fixes
  • Prevent prototype pollution via __proto__ in defaults (#​156)
  • Ignore inherited enumerable properties (11ba022)
🏡 Chore
✅ Tests
  • Add more tests for plain objects (b65f603)
🤖 CI
❤️ Contributors

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/npm-defu-vulnerability branch from d16480e to 4694b58 Compare April 7, 2026 05:05
@renovate
renovate Bot force-pushed the renovate/npm-defu-vulnerability branch from 4694b58 to 3a712c5 Compare April 8, 2026 19:52
@pkg-pr-new

pkg-pr-new Bot commented Apr 8, 2026

Copy link
Copy Markdown
@compodium/core

npm i https://pkg.pr.new/romhml/compodium/@compodium/core@173

@compodium/examples

npm i https://pkg.pr.new/romhml/compodium/@compodium/examples@173

@compodium/meta

npm i https://pkg.pr.new/romhml/compodium/@compodium/meta@173

@compodium/nuxt

npm i https://pkg.pr.new/romhml/compodium/@compodium/nuxt@173

@compodium/testing

npm i https://pkg.pr.new/romhml/compodium/@compodium/testing@173

@compodium/vue

npm i https://pkg.pr.new/romhml/compodium/@compodium/vue@173

commit: 3a712c5

@renovate
renovate Bot merged commit a384619 into main Apr 8, 2026
2 checks passed
@renovate
renovate Bot deleted the renovate/npm-defu-vulnerability branch April 8, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants