Zod can exhaust memory while validating oversized constrained collections
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | zod | < 4.6.6 | 4.6.6 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2023-54404
- https://github.com/colinhacks/zod/issues/1872
- https://github.com/colinhacks/zod/pull/6475
- https://github.com/colinhacks/zod/pull/6652
- https://github.com/colinhacks/zod/commit/a0ebf970f2d752e5f58527cd2942ff48be4f46bd
- https://github.com/colinhacks/zod
- https://www.vulncheck.com/advisories/zod-uncontrolled-resource-consumption-via-array-validation
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Weakness (CWE)
CWE-770- Platform
- npm
- Package
zod- Disclosed
- 01.10.2026
- Updated
- 23.10.2026 21:17
Sources and licenses
OSV / GitHub Advisory Database - GHSA-mrhx-c7xc-m3w5 - CC BY 4.0
Vulnerability history: zod
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 2
- First → latest
- 09.2023 10.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 1
- Medium 1
Disclosures per year
- 2023: 1
- 2024: 0
- 2025: 0
- 2026: 1
-
Zod can exhaust memory while validating oversized constrained collections this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.