Server crash via exponential email-regex backtracking
Published Sep 28, 2023 · Updated Dec 3, 2025
Inefficient regular expression complexity in Zod 3.21.0 through 3.22.3 allows remote attackers to crash servers via email validation. The emailRegex used by z.string().email() applies a quantified group containing an optional dot to attacker-controlled strings, causing exponential backtracking on crafted invalid addresses. Exposure requires an application to pass remotely supplied email values into this validator; CPU exhaustion can leave the hosting server unresponsive.
Summary
What happened
Inefficient regular expression complexity in Zod 3.21.0 through 3.22.3 allows remote attackers to crash servers via email validation. The emailRegex used by z.string().email() applies a quantified group containing an optional dot to attacker-controlled strings, causing exponential backtracking on crafted invalid addresses. Exposure requires an application to pass remotely supplied email values into this validator; CPU exhaustion can leave the hosting server unresponsive.
The record
- CVE
- CVE-2023-4316
- Published
- Sep 28, 2023
- Updated
- Dec 3, 2025
- Vendor
- colinhacks
- Product
- Zod
- Classifications
- CWE-1333, T1499.004
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Sep 28, 2023CVE publishedPublication date reported by the CVE source.
- Dec 3, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=3.21.0 <=3.22.3
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Fluid Attacks Zod ReDoS demonstrationproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo