Skip to content

chore(monorepo): update pnpm.catalog.default defu to ^6.1.5 [security]#8

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/npm-defu-vulnerability
Open

chore(monorepo): update pnpm.catalog.default defu to ^6.1.5 [security]#8
renovate[bot] wants to merge 1 commit intomainfrom
renovate/npm-defu-vulnerability

Conversation

@renovate
Copy link
Copy Markdown

@renovate renovate Bot commented Apr 19, 2026

This PR contains the following updates:

Package Change Age Confidence
defu ^6.1.4^6.1.5 age confidence

defu: Prototype pollution via __proto__ key in defaults argument

CVE-2026-35209 / GHSA-737v-mqg7-c878

More information

Details

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

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


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: (in timezone America/New_York)

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

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, 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 added the dependencies Upgrade or downgrade of project dependencies. label Apr 19, 2026
@renovate renovate Bot requested a review from a team April 19, 2026 03:08
@renovate renovate Bot enabled auto-merge (squash) April 19, 2026 03:08
@renovate renovate Bot added the dependencies Upgrade or downgrade of project dependencies. label Apr 19, 2026
@renovate renovate Bot requested review from a team and sullivanpj as code owners April 19, 2026 03:08
@renovate renovate Bot force-pushed the renovate/npm-defu-vulnerability branch from 37ec9f2 to e1d358a Compare April 30, 2026 02:12
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 30, 2026

@renovate renovate Bot changed the title chore(monorepo): update pnpm.catalog.default defu to ^6.1.7 [security] chore(monorepo): update pnpm.catalog.default defu to ^6.1.5 [security] May 3, 2026
@renovate renovate Bot force-pushed the renovate/npm-defu-vulnerability branch from e1d358a to 2133584 Compare May 3, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Upgrade or downgrade of project dependencies.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants