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.
Published: 2026-07-30
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability in Valibot occurs when the library’s flatten helper processes validation errors that contain attacker‑controlled keys such as toString, valueOf, or hasOwnProperty. These keys are not filtered by record() and become part of an issue path. When flatten attempts to push the error to an inherited Object prototype method, a TypeError is thrown, causing the application to crash instead of returning structured validation errors. This results in a denial‑of‑service condition for requests that exercise this code path.

Affected Systems

Affected products are the Valibot validation library from open‑circle, versions earlier than 1.4.2. All applications that depend on these versions and use record() validation followed by flatten of errors are at risk.

Risk and Exploitability

The CVSS score is 6.9, indicating moderate severity, and the EPSS score is less than 1 %, making exploitation unlikely under current threat landscape. It is not listed in the CISA KEV catalog. Attackers can trigger the error by submitting crafted JSON containing forbidden keys via any input that is validated with record() and subsequently flattened. While it does not allow code execution or data exposure, the TypeError leads to a denial‑of‑service by terminating the request processing pipeline.

Generated by OpenCVE AI on August 3, 2026 at 12:43 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Valibot to version 1.4.2 or newer.
  • Only call flatten on errors that have been sanitized from keys that can collide with Object prototype properties.
  • If an immediate upgrade is not possible, strip or rename keys such as toString, valueOf, and hasOwnProperty from user input before passing it to Valibot.

Generated by OpenCVE AI on August 3, 2026 at 12:43 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-5qjj-4xww-7phc Valibot: record() issue paths can make flatten() throw for inherited Object property names
History

Thu, 30 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 30 Jul 2026 08:15:00 +0000

Type Values Removed Values Added
First Time appeared Open-circle
Open-circle valibot
Vendors & Products Open-circle
Open-circle valibot

Thu, 30 Jul 2026 01:00:00 +0000

Type Values Removed Values Added
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.
Title Valibot: record() issue paths can make flatten() throw for inherited Object property names
Weaknesses CWE-755
References
Metrics cvssV4_0

{'score': 6.9, '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'}


Subscriptions

Open-circle Valibot
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-30T14:42:29.575Z

Reserved: 2026-07-07T18:49:15.607Z

Link: CVE-2026-59952

cve-icon Vulnrichment

Updated: 2026-07-30T14:42:00.490Z

cve-icon NVD

Status : Deferred

Published: 2026-07-30T01:17:06.840

Modified: 2026-07-30T20:07:01.330

Link: CVE-2026-59952

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T12:45:03Z

Weaknesses
  • CWE-755

    Improper Handling of Exceptional Conditions