# GHSA-MRHX-C7XC-M3W5: Zod can exhaust memory while validating oversized constrained collections

- Database: GitHub
- Severity: high (stated by ghsa, no CVSS score)
- Published: 2026-10-01
- Modified: 2026-10-23

## Tracked as

- [CVE-2023-54404](https://cve.now/CVE-2023-54404.md): CVE-2023-54404

## Affected versions

- zod (npm): 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.

## 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

Page: https://cve.now/GHSA-MRHX-C7XC-M3W5

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
