HIGH 7.5

CVE-2023-54404

Zod can exhaust memory while validating oversized constrained collections

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.

Affected Maven artifacts (2)

ArtifactAffected versionsFixed in
org.mvnpm » zodvia npm zod
< 4.6.6
4.6.6
org.webjars.npm » zodvia npm zod
< 4.6.6
4.6.6

Blast radius

2affected artifacts
110affected versions
41dependent artifacts (est.)
345dependent versions

21% of the dependent artifacts (9) still pull an affected version in their latest release.

DepthDependent versions
Direct
238
2 hops
76
3 hops
31

Most used dependents

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.

Other ecosystems

Also affects npm (1 package) . See all on OSV