Skip to content

fix(deps): Update auto-merged patch dependencies#2680

Open
renovate-sh-app[bot] wants to merge 1 commit into
mainfrom
renovate/prod-dependencies-automerge
Open

fix(deps): Update auto-merged patch dependencies#2680
renovate-sh-app[bot] wants to merge 1 commit into
mainfrom
renovate/prod-dependencies-automerge

Conversation

@renovate-sh-app

@renovate-sh-app renovate-sh-app Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
proxy-agent (source) dependencies patch 8.0.18.0.2
semver dependencies patch 7.8.27.8.5
valibot (source) dependencies patch 1.4.11.4.2

Warning

Some dependencies could not be looked up. Check the warning logs for more information.


Valibot: record() issue paths can make flatten() throw for inherited Object property names

CVE-2026-59952 / GHSA-5qjj-4xww-7phc

More information

Details

Summary

valibot 1.4.1 can throw a TypeError inside its flatten() helper when validation issues contain attacker-controlled object keys such as toString, valueOf, or hasOwnProperty.

The issue is reachable through normal record() validation. record() intentionally filters __proto__, prototype, and constructor, but it still accepts other own keys that collide with inherited Object.prototype properties. If the record key schema or value schema rejects such an entry, Valibot creates an issue path containing that key. Passing the resulting issues to Valibot's documented flatten() helper causes flatErrors.nested[dotPath] to resolve to the inherited method instead of an own error array, and the helper calls .push(...) on that function.

This is not a global prototype pollution issue. The impact is availability/error handling: applications that validate user-controlled objects with record() and flatten validation errors for API responses can crash the request path with a TypeError instead of returning structured validation errors.

Affected package
  • Ecosystem: npm
  • Package: valibot
  • Affected version verified: 1.4.1
  • Fixed version: none known
  • Repository: open-circle/valibot
  • Current main ref tested by source review: 9bb6617
Root cause

record() uses _isValidObjectKey() before validating record entries. The helper blocks the three classic prototype pollution keys:

key !== '__proto__' &&
key !== 'prototype' &&
key !== 'constructor'

It does not block other inherited Object.prototype names such as toString, valueOf, and hasOwnProperty. These remain valid own JSON object keys and can appear in issue paths when either the record key schema or value schema rejects the entry.

flatten() then creates nested error storage with an ordinary object:

flatErrors.nested = {};

For a dot path such as toString, this check reads the inherited Object.prototype.toString function:

if (flatErrors.nested![dotPath]) {
  flatErrors.nested![dotPath]!.push(issue.message);
}

Because the inherited function is truthy, flatten() calls .push(...) on a function and throws TypeError: flatErrors.nested[dotPath].push is not a function.

Impact

A remote attacker can trigger this if an application:

  1. validates attacker-controlled JSON objects with v.record(...);
  2. receives an invalid key or invalid value under a key such as toString;
  3. uses Valibot's flatten(result.issues) helper to prepare validation errors.

This is a common pattern in API/form validation: safeParse() collects issues and flatten() converts them into response-friendly error objects. Instead of a validation response, the request can hit an unexpected exception path.

The same root cause can also affect manually constructed issues or other schemas that place inherited Object property names into dot paths. I am reporting the record() path because it uses only public Valibot APIs and attacker-controlled JSON keys.

Local reproduction

Run in a disposable directory:

npm install valibot@1.4.1
node poc_record_flatten_inherited_key_dos.mjs

Minimal example:

import * as v from 'valibot';

const schema = v.record(v.string(), v.number());
const input = JSON.parse('{"toString":"not-a-number"}');

const result = v.safeParse(schema, input);
console.log(result.success); // false
console.log(result.issues[0].path.map((item) => item.key)); // ["toString"]

v.flatten(result.issues); // TypeError

Observed output from valibot@1.4.1:

{
  "name": "record value schema rejects attacker-controlled value",
  "key": "toString",
  "success": false,
  "issueCount": 1,
  "firstPath": ["toString"],
  "firstMessage": "Invalid type: Expected number but received \"not-a-number\"",
  "flattened": {
    "ok": false,
    "exception": "TypeError",
    "message": "flatErrors.nested[dotPath].push is not a function"
  }
}

The local PoC also reproduces the same exception for valueOf, hasOwnProperty, isPrototypeOf, propertyIsEnumerable, and toLocaleString. A control case with an ordinary key produces normal flattened errors.

Duplicate checks performed before submission
  • npm metadata confirmed current valibot release is 1.4.1 and maps to open-circle/valibot.
  • gh api repos/open-circle/valibot/private-vulnerability-reporting returned {"enabled":true}.
  • npm audit for a clean project containing only valibot@1.4.1 returned no vulnerabilities.
  • Repository advisories and the GitHub Advisory Database only returned the historical emoji ReDoS advisory fixed in 1.2.0.
  • OSV exact-version query for npm valibot 1.4.1 returned no vulnerabilities.
  • Public issue/PR searches for flatten toString, flatten hasOwnProperty, record toString, __proto__, constructor, and prototype pollution did not find a matching disclosure of this record() issue-path / flatten() exception.
  • Reviewed related public PRs: open-circle/valibot#67 added prototype pollution mitigation for record() by blacklisting __proto__, prototype, and constructor; it does not cover flatten() collisions with other inherited property names. open-circle/valibot#1429 is an open plain-object / record() type semantics PR and does not disclose this flatten() exception behavior.
Suggested remediation

Use null-prototype containers for flat error maps and/or perform own-property checks before appending:

  • Initialize flatErrors.nested as Object.create(null).
  • Check nested entries with Object.prototype.hasOwnProperty.call(flatErrors.nested, dotPath) rather than truthiness.
  • Consider filtering or escaping unsafe dot path segments in getDotPath() / flatten(), including inherited Object property names.
  • Add regression tests for flatten() with paths toString, valueOf, hasOwnProperty, __proto__, prototype, and constructor.
  • Consider using the same hardening for other accumulator objects that store attacker-controlled keys.

Severity

  • CVSS Score: 6.9 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

References

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


Release Notes

TooTallNate/proxy-agents (proxy-agent)

v8.0.2

Compare Source

Patch Changes
  • Updated dependencies [1852c75]
  • Updated dependencies [d8f2926]
  • Updated dependencies [84e85ed]
  • Updated dependencies [8487a78]
  • Updated dependencies [3ebf4b2]
  • Updated dependencies [ce0243e]
    • https-proxy-agent@​9.1.0
    • http-proxy-agent@​9.1.0
    • pac-proxy-agent@​9.1.0
    • socks-proxy-agent@​10.1.0
npm/node-semver (semver)

v7.8.5

Compare Source

Bug Fixes

v7.8.4

Compare Source

Bug Fixes

v7.8.3

Compare Source

Bug Fixes
Chores
open-circle/valibot (valibot)

v1.4.2

Compare Source

Many thanks to @​Faze-up and @​chatman-media for contributing to this release.

  • Fix word count actions to cache the Intl.Segmenter for non-primitive locales, preventing it from being recreated on every words, minWords, maxWords and notWords validation (pull request #​1521)
  • Fix flatten method to handle issue path keys that collide with Object.prototype members like toString instead of throwing a TypeError (pull request #​1522)
  • Fix intersect schema to merge object keys that collide with Object.prototype members like toString instead of failing to merge them (pull request #​1522)

Configuration

📅 Schedule: (in timezone Europe/Berlin)

  • Branch creation
    • Between 08:00 AM and 04:59 PM, Monday through Thursday (* 8-16 * * 1-4)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


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

Need help?

You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.

@renovate-sh-app
renovate-sh-app Bot requested review from a team as code owners May 29, 2026 08:12
@renovate-sh-app renovate-sh-app Bot added dependencies Update one or more dependencies version javascript Pull requests that update Javascript code no-changelog labels May 29, 2026
@renovate-sh-app
renovate-sh-app Bot requested review from ashharrison90 and jackw May 29, 2026 08:12
@renovate-sh-app
renovate-sh-app Bot enabled auto-merge (squash) May 29, 2026 08:12
@github-actions

github-actions Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Hello! 👋 This repository uses Auto for releasing packages using PR labels.

❌ This PR cannot be merged until the following issues are addressed:

  • This PR is missing one of the following labels: patch, minor, major, no-changelog.
  • Optionally if using a patch, minor or major label also add the release label if you would like this PR to trigger npm package publishing.
🏷️ More info about which labels to use
  • If the changes only affect the docs website, documentation, or this repository's tooling add the no-changelog label.
  • If there are changes to any of the npm packages src files please choose from one of the following labels:
    • 🐛 if this PR fixes a bug add the patch label
    • 🚀 if this PR includes an enhancement add the minor label
    • 💥 if this PR includes a breaking change add the major label
  • Optionally, if you would like this PR to publish new versions of packages when it is merged add the release label.

@tolzhabayev tolzhabayev moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team May 29, 2026
@renovate-sh-app renovate-sh-app Bot changed the title Update dependency @babel/parser to v7.29.7 chore(deps): Update dependency @babel/parser to v7.29.7 May 29, 2026
@renovate-sh-app

Copy link
Copy Markdown
Contributor Author

Rebase requested. Renovate is processing this repository now.

@renovate-sh-app
renovate-sh-app Bot force-pushed the renovate/prod-dependencies-automerge branch from db90662 to 61cd281 Compare June 10, 2026 09:58
@renovate-sh-app renovate-sh-app Bot changed the title chore(deps): Update dependency @babel/parser to v7.29.7 fix(deps): Update dependency @babel/parser to v7.29.7 Jun 10, 2026
@renovate-sh-app renovate-sh-app Bot changed the title fix(deps): Update dependency @babel/parser to v7.29.7 fix(deps): Update auto-merged patch dependencies to v7.29.7 Jun 10, 2026
@renovate-sh-app
renovate-sh-app Bot force-pushed the renovate/prod-dependencies-automerge branch from 61cd281 to cb55d3a Compare June 11, 2026 17:12
@renovate-sh-app renovate-sh-app Bot changed the title fix(deps): Update auto-merged patch dependencies to v7.29.7 fix(deps): Update auto-merged patch dependencies Jun 11, 2026
@renovate-sh-app
renovate-sh-app Bot force-pushed the renovate/prod-dependencies-automerge branch from cb55d3a to 855001e Compare June 13, 2026 02:12
@renovate-sh-app
renovate-sh-app Bot force-pushed the renovate/prod-dependencies-automerge branch from 855001e to 44a3453 Compare June 22, 2026 20:10
@renovate-sh-app
renovate-sh-app Bot force-pushed the renovate/prod-dependencies-automerge branch from 44a3453 to 26c6cbd Compare July 1, 2026 17:15
@renovate-sh-app
renovate-sh-app Bot force-pushed the renovate/prod-dependencies-automerge branch 4 times, most recently from b646585 to fbcbbb5 Compare July 21, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge-security-update dependencies Update one or more dependencies version javascript Pull requests that update Javascript code severity:

Projects

Status: 🔬 In review

Development

Successfully merging this pull request may close these issues.

1 participant