npm
CVE-2026-121707
Effect: ReDoS in Schema.TemplateLiteral compiled regex
- Severity
- High
- Published
- 19 Nov 2026
- Last changed
- 19 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 3.22.1
- Exploit chance
- 0.5% in the next 30 daysHigher than 42% of CVEs. EPSS by FIRST, 24 Nov 2026
- Also known as
- GHSA-7589-6fvf-x4pw
- Sources
- OSV.dev and GitHub
Description
Schema.TemplateLiteral compiles each Schema.String span to the lazy wildcard [\s\S]*? and decodes input by running the resulting regular expression against it. When a template has two or more Schema.String spans, for example:
the regex contains several ambiguous wildcards. A non-matching input makes the backtracking engine try combinations across all of them, so matching time grows cubically with input length. A 5,000-character string of : characters blocks the event loop for about 15 seconds.
Applications that decode untrusted input with such a schema are affected. That includes Schema.decodeUnknown, Schema.decodeUnknownSync and Schema.is, and anything built on them, such as HttpApi request payloads and @effect/rpc payloads.
Workarounds
If you can't upgrade, check the input length before the template literal runs. Adding Schema.maxLength with .pipe doesn't help, because the filter runs after the regex. Put the length check on the input side instead:
Rejecting oversized request bodies before they reach the schema also works.
Affected software
| Software | Affected versions |
|---|---|
effectnpm · osv:npm:effect |
|
About effect
- Weekly downloads (npm)
- 66,627,362npm, 24 Nov 2026
Vulnerabilities in effect
- In our list
- 2
- Published in the last 12 months
- 2
- Critical, last 12 months
- 0
- High, last 12 months
- 1
- Known exploited
- 0
- CVE-2026-115779Effect: Cookie attribute injection via domain, path, and name fields in @effect/platform makeCookie()Medium 10 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-121707
- GitHub Advisory Database https://github.com/advisories/GHSA-7589-6fvf-x4pw