zod is vulnerable to Denial of Service (DoS)
75
CVE Score
High
Denial of Service (DoS)
Zod's array schema validation accumulates a new validation issue object for every element that fails a check, inside the handleArrayResult logic of $ZodArray, with no cap or early termination check on the total. Parsing a large array against an array schema that carries no length constraint lets each failing element add another issue object, so the process keeps allocating until it exhausts memory and crashes.
Upgrade the zod and/or the @zod/mini library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and you parse untrusted input against an array schema (z.array()) that has no maximum length constraint.
0.0.1 - 4.6.5
Fixed in 4.6.6zod is vulnerable to Denial of Service (DoS) in versions 0.0.1 - 4.6.5.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.