Skip to content

chore(deps): update pnpm.catalog.runtime defu to v6.1.5 [security]#592

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

chore(deps): update pnpm.catalog.runtime defu to v6.1.5 [security]#592
renovate[bot] wants to merge 1 commit intomainfrom
renovate/npm-defu-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Apr 4, 2026

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


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 OSV and 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: Branch creation - "" in timezone Europe/Copenhagen, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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 added the security label Apr 4, 2026
@renovate renovate bot requested a review from luxass April 4, 2026 07:04
@renovate renovate bot requested a review from luxass as a code owner April 4, 2026 07:04
@renovate
Copy link
Copy Markdown
Contributor Author

renovate bot commented Apr 4, 2026

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: pnpm-lock.yaml
Scope: all 32 workspace projects
Progress: resolved 1, reused 0, downloaded 0, added 0
Progress: resolved 75, reused 0, downloaded 0, added 0
Progress: resolved 207, reused 0, downloaded 0, added 0
Progress: resolved 432, reused 0, downloaded 0, added 0
/tmp/renovate/repos/github/ucdjs/ucd/packages/shared-ui:
 ERR_PNPM_TRUST_DOWNGRADE  High-risk trust downgrade for "reselect@5.1.1" (possible package takeover)

This error happened while installing the dependencies of @base-ui/utils@0.2.6

Trust checks are based solely on publish date, not semver. A package cannot be installed if any earlier-published version had stronger trust evidence. Earlier versions had provenance attestation, but this version has no trust evidence. A trust downgrade may indicate a supply chain incident.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 4, 2026

🌏 Preview Deployments

Application Status Preview URL
API ⏳ In Progress N/A
Store ⏳ In Progress N/A
Website ⏳ In Progress N/A
Documentation ⏳ In Progress N/A

Built from commit: d87f0e9e0ef561b26b1154f1d1d9166f9ae43364


🤖 This comment will be updated automatically when you push new commits to this PR.

@renovate renovate bot force-pushed the renovate/npm-defu-vulnerability branch 4 times, most recently from 084da2e to 2371cd0 Compare April 5, 2026 06:23
@socket-security
Copy link
Copy Markdown

socket-security bot commented Apr 5, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@renovate renovate bot force-pushed the renovate/npm-defu-vulnerability branch from 2371cd0 to 1d3c740 Compare April 7, 2026 01:57
@renovate renovate bot force-pushed the renovate/npm-defu-vulnerability branch from 1d3c740 to fc14073 Compare April 7, 2026 19:28
@luxass luxass closed this Apr 7, 2026
@renovate renovate bot deleted the renovate/npm-defu-vulnerability branch April 7, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant