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

Medium 6.9 Published Updated

Attackers can crash applications by triggering a TypeError in the flatten helper when validating objects with specific inherited property names.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-59952?

CVE-2026-59952 is a medium-severity denial of service vulnerability in open-circle valibot, published on 30 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-755

Which versions are affected by CVE-2026-59952?

2 open source packages ship an affected version, including valibot.

PackageAffectedFixed in
valibot npmAll versions1.4.2
valibot npmAll versions1.4.2

How do I fix CVE-2026-59952?

Upgrade valibot to 1.4.2 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-59952 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59952 exists.

Sources

Also known as CLSA-2026-1792473247, GHSA-5qjj-4xww-7phc, MINI-cw78-33gv-44cf.

Is CVE-2026-59952 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free