{"vuln_id":"GHSA-7589-6fvf-x4pw","aliases":["CVE-2026-121707"],"description":"Effect: ReDoS in Schema.TemplateLiteral compiled regex","published_at":"2026-11-19T20:51:01Z","modified_at":"2026-11-19T20:51:02Z","first_seen_at":"2026-11-21T19:15:19.467715Z","severity":"high","severity_source":"ghsa","cvss_score":8.7,"cvss_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","cwe":["CWE-1333"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-7589-6fvf-x4pw"},"matched_alias":null,"items":[{"id":2389,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-7589-6fvf-x4pw / CVE-2026-121707: Effect: ReDoS in Schema.TemplateLiteral compiled regex","summary":"Effect: ReDoS in Schema.TemplateLiteral compiled regex\n\n### Impact\n\n`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:\n\n```ts\nSchema.TemplateLiteral(Schema.String, \":\", Schema.String, \":\", Schema.String, \"X\")\n```\n\nthe 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.\n\nApplications 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.\n\n### Patches\n\nFixed in `effect@3.22.1` (#6761). Template literals whose spans are all `Schema.String` are now matched with a linear left-to-right scan instead of a regular expression.\n\n### Workarounds\n\nIf 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:\n\n```ts\nSchema.compose(Schema.String.pipe(Schema.maxLength(256)), MyTemplateLiteral)\n```\n\nRejecting oversized request bodies before they reach the schema also works.\n\nAffected packages: npm:effect\nPatched: effect 3.22.1","url":"https://github.com/advisories/GHSA-7589-6fvf-x4pw","published_at":"2026-11-19T20:51:01Z","updated_at":"2026-11-19T20:51:02Z","fetched_at":"2026-11-21T19:15:18.416799Z","severity":"high","cvss_score":8.7,"epss":0.00488,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"effect","vuln_id":"CVE-2026-121707","vuln_ids":["CVE-2026-121707","GHSA-7589-6FVF-X4PW"],"tags":["ghsa","npm","CWE-1333"],"cluster_id":2206,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2389","html":"https://vulnwatch.ve1ve2.com/item/2389"}},{"id":6622,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-121707: Effect is a TypeScript framework that consists of several packages that work together to help build TypeScript applications. Prior to 3.22.1, Schema.TemplateLi…","summary":"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.\n\nReferences:\nhttps://github.com/Effect-TS/effect/commit/3cc3c6e1a64cbdc360e9d28e44f3ec3ce0ece6e3\nhttps://github.com/Effect-TS/effect/pull/6761\nhttps://github.com/Effect-TS/effect/releases/tag/effect@3.22.1\nhttps://github.com/Effect-TS/effect/security/advisories/GHSA-7589-6fvf-x4pw","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-121707","published_at":"2026-11-17T20:17:36.580000Z","updated_at":"2026-11-19T04:17:24.360000Z","fetched_at":"2026-11-21T19:15:31.482422Z","severity":"high","cvss_score":8.7,"epss":0.00488,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-121707","vuln_ids":["CVE-2026-121707","GHSA-7589-6FVF-X4PW"],"tags":["CWE-1333"],"cluster_id":2207,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/6622","html":"https://vulnwatch.ve1ve2.com/item/6622"}}]}