CVE-2026-121707: Effect: ReDoS in Schema.TemplateLiteral compiled regex
Published 2026-11-19 · Updated 2026-11-19 · Also known as GHSA-7589-6fvf-x4pw
Summary
The Effect library's Schema.TemplateLiteral implementation contains a Regular Expression Denial of Service (ReDoS) vulnerability due to ambiguous wildcards. Developers using Effect schemas to decode untrusted input should upgrade to the latest version to prevent potential event loop blocking.
Who is affected
The vulnerability affects applications that use Schema.TemplateLiteral with multiple string spans to decode untrusted input, including those using Schema.decodeUnknown, HttpApi, or @effect/rpc. When processing crafted non-matching inputs, the regex engine triggers excessive backtracking that causes exponential growth in matching time, leading to significant CPU consumption and event loop starvation.
Exploitability
The vulnerability is rated as High severity, indicating a significant potential for service disruption. With a CVSS 4.0 attack vector of Network and an EPSS score of 0.003, the flaw is remotely exploitable without authentication, though there is no current evidence of active exploitation via the CISA KEV catalog.
Remediation
- Upgrade the effect package to version 3.22.1 or later.
- If immediate patching is not possible, implement input length validation (e.g., using Schema.maxLength on the input string before decoding) to mitigate the impact of the ReDoS.
How to check your project
- Review package.json to identify if the 'effect' dependency is lower than 3.22.1.
- Search the codebase for usages of 'Schema.TemplateLiteral' that contain two or more 'Schema.String' spans.
Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| npm | effect |
>= 0, < 3.22.1 | 3.22.1 | npm install [email protected] |
CVSS 4.0 vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Attack requirements | None |
| Privileges required | None |
| User interaction | None |
| Confidentiality (vulnerable system) | None |
| Integrity (vulnerable system) | None |
| Availability (vulnerable system) | High |
| Confidentiality (subsequent systems) | None |
| Integrity (subsequent systems) | None |
| Availability (subsequent systems) | None |
Base score is not computed for CVSS 4.0 vectors; severity is taken from the advisory.
FAQ
Is my application affected if I don't use TemplateLiteral?
No, this specific vulnerability is isolated to the Schema.TemplateLiteral implementation within the Effect library.
Does adding Schema.maxLength directly to the TemplateLiteral schema fix the issue?
No, because the filter runs after the vulnerable regex has already been executed. You must validate the length of the input before it is processed by the template literal schema.
Has this vulnerability been exploited in the wild?
No, CISA has not listed this vulnerability in its Known Exploited Vulnerabilities catalog.
Original advisory description
References
- WEB https://github.com/Effect-TS/effect/security/advisories/GHSA-7589-6fvf-x4pw
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-121707
- WEB https://github.com/Effect-TS/effect/pull/6761
- WEB https://github.com/Effect-TS/effect/commit/3cc3c6e1a64cbdc360e9d28e44f3ec3ce0ece6e3
- PACKAGE https://github.com/Effect-TS/effect
- WEB https://github.com/Effect-TS/effect/releases/tag/[email protected]
Source records: GHSA-7589-6fvf-x4pw (OSV.dev) · EPSS by FIRST, 2026-11-22.