{"cve":"CVE-2023-54404","nvd":{"published":"2026-10-01T18:17:11.040","modified":"2026-10-22T19:17:32.020","status":"Awaiting Analysis","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.","cvss_v4":{"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.2},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-770","CWE-1188"],"references":["https://github.com/colinhacks/zod/issues/1872","https://github.com/colinhacks/zod/pull/6475","https://github.com/colinhacks/zod/pull/6652","https://www.vulncheck.com/advisories/zod-uncontrolled-resource-consumption-via-array-validation"],"products":[],"source":"nvd","synced_at":"2026-10-23T16:39:26.291718493+00:00"},"epss":{"cve":"CVE-2023-54404","score":0.00346,"percentile":0.27885,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-mrhx-c7xc-m3w5","url":"https://osv.dev/vulnerability/GHSA-mrhx-c7xc-m3w5","summary":"Zod can exhaust memory while validating oversized constrained collections","modified":"2026-10-23T18:30:09.376405885Z","packages":[{"ecosystem":"npm","name":"zod","purl":"pkg:npm/zod","ranges":["<4.6.6"],"fixed":["4.6.6"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}