Effect-TS Effect
Effect: ReDoS in Schema.TemplateLiteral compiled regex
Effect is a TypeScript framework that consists of several packages that work together to help build TypeScript applications. Prior to 3.22.1, Schema.TemplateLiteral schemas containing at least two Schema.String spans compile each span to the ambiguous lazy wildcard [\s\S]*?. Decoding a non-matching untrusted string causes cubic regular expression backtracking, which can block the JavaScript event loop. The issue affects Schema.decodeUnknown, Schema.decodeUnknownSync, Schema.is, and consumers such as HttpApi and @effect/rpc payload decoding. This issue is fixed in version 3.22.1.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 3.22.1
Fixed in 3.22.1
Mitigation
Upgrade effect to 3.22.1 or later.
References
- Vendor advisory github.com/Effect-TS/effect/security/advisorie…
- Patch github.com/Effect-TS/effect/pull/6761
- Patch github.com/Effect-TS/effect/commit/3cc3c6e1a64…
1 more
- Release notes github.com/Effect-TS/effect/releases/tag/effec…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.