GitHub Advisoryadvisory · npm

GHSA-mrhx-c7xc-m3w5 Zod can exhaust memory while validating oversized constrained collections

HIGH Published 2026-10-01 Modified 2026-10-23 Official page ↗
Aliases
CVE-2023-54404
Ecosystem
npm
Packages
zod
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weaknesses
CWE-770
Reviewed
2026-10-23

Affected packages

• npm zod: < 4.6.6 → fixed in 4.6.6

Description

Zod schema-validation library through 4.6.5 contains an uncontrolled resource consumption vulnerability that allows attackers to exhaust memory by submitting a large array to an application using an array schema without a length constraint. Attackers can exploit the handleArrayResult parse logic in $ZodArray, which accumulates every validation issue for each failing element with no cap or early termination, causing the process to allocate excessive issue objects and crash due to out-of-memory conditions.

Related

Alias · not in database (1)

Weakness · CWE (1)

  • CWE-770 Allocation of Resources Without Limits or Throttling weakness

References