---
title: "GHSA-7589-6fvf-x4pw: Effect: ReDoS in Schema.TemplateLiteral compiled regex"
description: "High severity. Effect: ReDoS in Schema.TemplateLiteral compiled regex. Affects effect; fixed in 3.22.1."
url: https://inlinr.com/advisories/GHSA-7589-6fvf-x4pw
lang: en
---

[Packages](https://inlinr.com/packages) / [effect](https://inlinr.com/packages/effect) / [Security](https://inlinr.com/packages/effect/security)

High Vulnerability GHSA-7589-6fvf-x4pw CVE-2026-121707 Published 19 Nov 2026

# Effect: ReDoS in Schema.TemplateLiteral compiled regex

Your version 

Affected releases · [effect](https://inlinr.com/packages/effect)

- 3.x 3.0.0 – 3.22.0 Fixed in 3.22.1
- 2.x and older 1.0.0 – 2.4.19 No fix, no longer updated

On 3.x, the newest line:

```
npm install effect@3.22.1
```

Every release on a timeline

4.x 

1. Not affected

4.0.0 – 4.1.5  
14 releases

3.x 

1. Affected

3.0.0 – 3.22.0  
227 releases
2. Fixed

3.22.1 – 3.22.5  
5 releases

2.x 

1. Affected

2.0.0 – 2.4.19  
44 releases

1.x 

1. Affected

1.0.0 – 1.2.0  
6 releases

296 stable releases of effect, oldest to newest, one row per major.

## What happens

Impact

`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:

```
Schema.TemplateLiteral(Schema.String, ":", Schema.String, ":", Schema.String, "X")
```

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](https://inlinr.com/packages/@effect/rpc) payloads.

Patches

Fixed in `effect@3.22.1` ([#6761](https://github.com/effect-ts/effect/issues/6761)). Template literals whose spans are all `Schema.String` are now matched with a linear left-to-right scan instead of a regular expression.

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:

```
Schema.compose(Schema.String.pipe(Schema.maxLength(256)), MyTemplateLiteral)
```

Rejecting oversized request bodies before they reach the schema also works.

## How it is exploited

Exploitable over the network, with no account and no action from a user.

- **Confidentiality**: none
- **Integrity**: none
- **Availability**: high

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

## References

- [Reference](https://github.com/Effect-TS/effect/security/advisories/GHSA-7589-6fvf-x4pw "https://github.com/Effect-TS/effect/security/advisories/GHSA-7589-6fvf-x4pw")  
github.com/Effect-TS/effect/security/advisories…
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-121707 "https://nvd.nist.gov/vuln/detail/CVE-2026-121707")  
nvd.nist.gov/vuln/detail/CVE-2026-121707
- [Pull request](https://github.com/Effect-TS/effect/pull/6761 "https://github.com/Effect-TS/effect/pull/6761")  
#6761
- [Fix commit](https://github.com/Effect-TS/effect/commit/3cc3c6e1a64cbdc360e9d28e44f3ec3ce0ece6e3 "https://github.com/Effect-TS/effect/commit/3cc3c6e1a64cbdc360e9d28e44f3ec3ce0ece6e3")  
3cc3c6e
- [Package](https://github.com/Effect-TS/effect "https://github.com/Effect-TS/effect")  
github.com/Effect-TS/effect
- [Reference](https://github.com/Effect-TS/effect/releases/tag/effect@3.22.1 "https://github.com/Effect-TS/effect/releases/tag/effect@3.22.1")  
github.com/Effect-TS/effect/releases/tag/effect…

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
