Patch Forecast
Amber warning
Patch this week.

CVE-2023-54404 · GHSA-mrhx-c7xc-m3w5

Zod can exhaust memory while validating oversized constrained collections

Risk score
60/100
CVSS
7.5 v3.1
Exploit chance (30 days)
0.4%
Published
1 Oct 2026

Open in the live forecast Today's forecast

What to know

What it is
Zod schema-validation library contains an uncontrolled resource consumption vulnerability that allows attackers to exhaust memory by submitting a large array, set or map to an application that uses a container schema without an explicit size constraint. The handleArrayResult parse logic in $ZodArray (and the equivalen…
Affected
zod (npm) < 4.6.6
Fix
Upgrade zod to 4.6.6 or later.
Exploitation
No known exploitation

Why it is Amber

  • CVSS 7.5 high
  • Remotely exploitable without logging in
  • On your watchlist: npm

Affected packages

PackageEcosystemVulnerableFixed in
zodnpm< 4.6.64.6.6

References

Original description

Zod schema-validation library contains an uncontrolled resource consumption vulnerability that allows attackers to exhaust memory by submitting a large array, set or map to an application that uses a container schema without an explicit size constraint. The handleArrayResult parse logic in $ZodArray (and the equivalent set and map paths) accumulates every validation issue for each failing element with no cap or early termination, causing the process to allocate one issue object per element and crash under out-of-memory conditions. This is reachable in the default configuration whenever a container schema such as z.array() is declared without a size bound. The upstream change in commit e06a510 (pull request 6652, first released in 4.6.6) only moves the .max(), .length() and .size() size checks to run before element parsing, so it rejects oversized input for schemas that declare an explicit upper bound; per the maintainer, unbounded containers are unchanged. No released version remediates the unbounded (default) case described here, and an opt-in setting to cap total accumulated errors was proposed but not merged.

Last activity 1 Oct 2026. Patch Forecast updates every hour.