Skip to content

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

Merged
farnabaz merged 2 commits intomainfrom
renovate/npm-defu-vulnerability
Apr 13, 2026
Merged

chore(deps): update dependency defu to v6.1.5 [security]#3757
farnabaz merged 2 commits 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


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: Disabled by config. Please merge this manually once you are satisfied.

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.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
content Error Error Apr 13, 2026 4:13pm

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 4, 2026

npm i https://pkg.pr.new/@nuxt/content@3757

commit: 5d45bcf

@renovate renovate Bot force-pushed the renovate/npm-defu-vulnerability branch from e4fa16b to 29e4933 Compare April 8, 2026 15:49
@renovate
Copy link
Copy Markdown
Contributor Author

renovate Bot commented Apr 13, 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
[16:11:49.606] INFO (767): Installing tool node@24.14.1...
[16:11:52.841] ERROR (767): failed to check url
    url: "https://github.com/containerbase/node-prebuild/releases/download/24.14.1/node-24.14.1-x86_64.tar.xz.sha512"
    err: {
      "type": "HTTPError",
      "message": "Request failed with status code 504 (Gateway Time-out): HEAD https://github.com/containerbase/node-prebuild/releases/download/24.14.1/node-24.14.1-x86_64.tar.xz.sha512",
      "stack":
          HTTPError: Request failed with status code 504 (Gateway Time-out): HEAD https://github.com/containerbase/node-prebuild/releases/download/24.14.1/node-24.14.1-x86_64.tar.xz.sha512
              at _Request.<anonymous> (/snapshot/dist/containerbase-cli.js:44369:32)
              at Object.onceWrapper (node:events:623:26)
              at _Request.emit (node:events:520:35)
              at _Request.emit (node:domain:489:12)
              at _Request._onResponseBase (/snapshot/dist/containerbase-cli.js:43824:14)
              at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
              at async _Request._onResponse (/snapshot/dist/containerbase-cli.js:43865:7)
      "name": "HTTPError",
      "code": "ERR_NON_2XX_3XX_RESPONSE",
      "timings": {
        "start": 1776096712829,
        "socket": 1776096712829,
        "lookup": 1776096712829,
        "connect": 1776096712829,
        "secureConnect": 1776096712829,
        "upload": 1776096712829,
        "response": 1776096712834,
        "end": 1776096712834,
        "phases": {
          "wait": 0,
          "dns": 1,
          "tcp": 4,
          "tls": 5,
          "request": 0,
          "firstByte": 5,
          "download": 0,
          "total": 5
        }
      },
      "options": {
        "agent": {},
        "decompress": true,
        "timeout": {},
        "prefixUrl": "",
        "ignoreInvalidCookies": false,
        "context": {},
        "hooks": {
          "init": [],
          "beforeRequest": [],
          "beforeError": [],
          "beforeRedirect": [],
          "beforeRetry": [],
          "beforeCache": [],
          "afterResponse": []
        },
        "followRedirect": true,
        "maxRedirects": 10,
        "throwHttpErrors": true,
        "username": "",
        "password": "",
        "http2": false,
        "allowGetBody": false,
        "copyPipedHeaders": true,
        "headers": {
          "user-agent": "containerbase/14.6.16 node/24.14.1 (https://github.com/containerbase)",
          "accept-encoding": "gzip, deflate, br, zstd"
        },
        "methodRewriting": false,
        "retry": {
          "limit": 2,
          "methods": [
            "GET",
            "PUT",
            "HEAD",
            "DELETE",
            "OPTIONS",
            "TRACE"
          ],
          "statusCodes": [
            408,
            413,
            429,
            500,
            502,
            503,
            504,
            521,
            522,
            524
          ],
          "errorCodes": [
            "ETIMEDOUT",
            "ECONNRESET",
            "EADDRINUSE",
            "ECONNREFUSED",
            "EPIPE",
            "ENOTFOUND",
            "ENETUNREACH",
            "EAI_AGAIN"
          ],
          "backoffLimit": null,
          "noise": 100,
          "enforceRetryRules": false
        },
        "method": "HEAD",
        "cacheOptions": {},
        "https": {},
        "resolveBodyOnly": false,
        "isStream": false,
        "responseType": "text",
        "url": "https://github.com/containerbase/node-prebuild/releases/download/24.14.1/node-24.14.1-x86_64.tar.xz.sha512",
        "pagination": {
          "countLimit": null,
          "backoff": 0,
          "requestLimit": 10000,
          "stackAllItems": false
        },
        "setHost": true,
        "enableUnixSockets": false,
        "strictContentLength": false
      }
    }
[16:11:52.891] ERROR (767): Request failed with status code 504 (Gateway Time-out): HEAD https://github.com/containerbase/node-prebuild/releases/download/24.14.1/node-24.14.1-x86_64.tar.xz.sha512
[16:11:52.891] FATAL (767): Install tool node failed in 3.2s.

@farnabaz farnabaz merged commit a104bf5 into main Apr 13, 2026
5 of 6 checks passed
@farnabaz farnabaz deleted the renovate/npm-defu-vulnerability branch April 13, 2026 16:16
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.

1 participant