CVE-2026-42567: Svelte Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-9rmh-mm8f-r9h6
CWE-1333
Published
Advisory Summary

CVE-2026-42567 is a MODERATE denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Svelte libraries in the npm ecosystem. The issue involves redos in `<svelte:element>` tag validation. Remediation is available by upgrading affected packages to version 5.55.7.

CVE-2026-42567 at a Glance

CVE Identifier CVE-2026-42567
GHSA Identifier GHSA-9rmh-mm8f-r9h6
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Svelte
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-42567

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

svelte fixed: 5.55.7
npm install svelte@5.55.7
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 svelte

How to Check if You Are Affected

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

npm ls svelte

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

Note: The npm ls svelte 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 Svelte, 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

An internal regex in the Svelte runtime can take exponential time to test in `<svelte:element this={tag}></svelte:element>`. You are only vulnerable to this if you allow tags of unconstrained length. If your application only allows a predetermined list of tags or trims their length before passing them to `svelte:element`, you are safe.

CVE-2026-42567 Affected Svelte Versions

1 component(s)
Fixed Versions:
5.55.7
Product / Package Ecosystem Affected Versions Fixed Version
svelte
npm
≥ 5.51.5
< 5.55.7
5.55.7

References

Frequently Asked Questions

What is CVE-2026-42567?
CVE-2026-42567 is a security vulnerability in Svelte involving ReDoS in `<svelte:element>` Tag Validation under CWE-1333: Inefficient Regular Expression Complexity.
Which Svelte versions are affected?
Affected versions include releases prior to 5.55.7 across affected packages: svelte.
What version fixes CVE-2026-42567?
Upgrading to 5.55.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is svelte affected?
Yes, svelte is affected in releases prior to 5.55.7. Upgrade your dependency to 5.55.7 or later.
What CWE is associated with CVE-2026-42567?
CVE-2026-42567 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-42567?
Run the dependency tree command: 'npm ls svelte'. 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-9rmh-mm8f-r9h6",
  "modified" : "2026-06-09T18:41:19Z",
  "published" : "2026-05-14T20:29:05Z",
  "aliases" : [ "CVE-2026-42567" ],
  "summary" : "Svelte: ReDoS in `<svelte:element>` Tag Validation",
  "details" : "An internal regex in the Svelte runtime can take exponential time to test in `<svelte:element this={tag}></svelte:element>`. You are only vulnerable to this if you allow tags of unconstrained length. If your application only allows a predetermined list of tags or trims their length before passing them to `svelte:element`, you are safe.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "svelte"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.51.5"
      }, {
        "fixed" : "5.55.7"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.55.6"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sveltejs/svelte/security/advisories/GHSA-9rmh-mm8f-r9h6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42567"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sveltejs/svelte"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sveltejs/svelte/releases/tag/svelte%405.55.7"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-14T20:29:05Z",
    "nvd_published_at" : "2026-06-09T17:17:07Z"
  }
}