Vulnerabilities in pkg:npm/effect

PACKAGE
Advisory Identifier: GHSA-7589-6fvf-x4pw
Advisory Summary

CVE-2026-121707 is a HIGH denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Effect libraries in the npm ecosystem. The issue involves redos in schema.templateliteral compiled regex. Remediation is available by upgrading affected packages to version 3.22.1.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/effect

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/effect. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-7589-6fvf-x4pw CVE-2026-121707 HIGH Effect: ReDoS in Schema.TemplateLiteral compiled regex
GHSA-38f7-945m-qr2g CVE-2026-32887 HIGH Effect `AsyncLocalStorage` context lost/contaminated inside Effect fibers under concurrent load with RPC
GHSA-6hr9-4692-fch9 CVE-2020-7624 CRITICAL Withdrawn Advisory: OS Command Injection in effect

CVE-2026-121707 at a Glance

CVE Identifier CVE-2026-121707
GHSA Identifier GHSA-7589-6fvf-x4pw
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Effect
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-121707

To remediate this vulnerability, upgrade all affected Effect dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

effect fixed: 3.22.1
npm install effect@3.22.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls effect

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-121707, inspect your project dependencies using npm:

npm ls effect

Analyze the terminal output to locate any version of Effect in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.22.1), your application is affected.

Note: The npm ls effect command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Effect, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: ```ts 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` payloads. ### Patches Fixed 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. ### 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: ```ts Schema.compose(Schema.String.pipe(Schema.maxLength(256)), MyTemplateLiteral) ``` Rejecting oversized request bodies before they reach the schema also works.

CVE-2026-121707 Affected Effect Versions

1 component(s)
Fixed Versions:
3.22.1
Product / Package Ecosystem Affected Versions Fixed Version
effect
npm
< 3.22.1
3.22.1

References

Frequently Asked Questions

What is CVE-2026-121707?
CVE-2026-121707 is a security vulnerability in Effect involving ReDoS in Schema.TemplateLiteral compiled regex under CWE-1333: Inefficient Regular Expression Complexity.
Which Effect versions are affected?
Affected versions include releases prior to 3.22.1 across affected packages: effect.
What version fixes CVE-2026-121707?
Upgrading to 3.22.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is effect affected?
Yes, effect is affected in releases prior to 3.22.1. Upgrade your dependency to 3.22.1 or later.
What CWE is associated with CVE-2026-121707?
CVE-2026-121707 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check npm dependencies for CVE-2026-121707?
Run the dependency tree command: 'npm ls effect'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7589-6fvf-x4pw",
  "modified" : "2026-11-19T20:51:01Z",
  "published" : "2026-11-19T20:51:01Z",
  "aliases" : [ "CVE-2026-121707" ],
  "summary" : "Effect: ReDoS in Schema.TemplateLiteral compiled regex",
  "details" : "### 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.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "effect"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.22.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.22.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Effect-TS/effect/security/advisories/GHSA-7589-6fvf-x4pw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-121707"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Effect-TS/effect/pull/6761"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Effect-TS/effect/commit/3cc3c6e1a64cbdc360e9d28e44f3ec3ce0ece6e3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Effect-TS/effect"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Effect-TS/effect/releases/tag/effect@3.22.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-19T20:51:01Z",
    "nvd_published_at" : "2026-11-17T20:17:36Z"
  }
}