CVE-2026-42567: Svelte Exponential ReDoS Vulnerability in `<svelte:element>` Tag Validation

svelte Updated 14 May 2026

Summary

14/05/2026
Yes i
Moderate
5.9

CVE-2026-42567: Svelte: ReDoS in Tag Validation. Affects svelte versions >= 5.51.5, < 5.55.7. Fixed in 5.55.7. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Svelte is a modern JavaScript framework that allows developers to build user interfaces with a focus on performance and simplicity. It compiles components into highly efficient JavaScript code, enabling reactive programming without the overhead of a virtual DOM. However, a vulnerability has been identified in the <svelte:element> tag validation, which can lead to performance issues if not managed properly.

Vulnerability Detail

The vulnerability arises from an internal regular expression (regex) used in the Svelte runtime that can take exponential time to evaluate when processing the <svelte:element this={tag}></svelte:element> syntax. This issue is particularly concerning if applications permit tags of unconstrained length, potentially leading to Denial of Service (DoS) conditions. If an attacker can manipulate the input to this tag, they could exploit the regex, causing the application to hang or crash.

How To Fix

Latest published version: 5.57.2 as of 23 Oct 2026

npm install svelte@5.57.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.55.7

This is the first release that contains the fix.

npm install svelte@5.55.7

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If you cannot update the package immediately, consider implementing a workaround by restricting the length of tags passed to <svelte:element>. For example, you can trim the length of the tag before passing it: `

let safeTag = tag.length > 20 ? tag.slice(0, 20) : tag;

` This ensures that only tags of a manageable length are processed.

Conclusion

In summary, the vulnerability identified as CVE-2026-42567 in the Svelte framework can lead to significant performance issues if not addressed. By updating to the patched version or implementing a workaround, developers can safeguard their applications against potential exploitation.

See every vulnerability recorded for svelte →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 5.9, indicating a moderate severity level.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application without signup using the Vulert playground at Vulert Scanner.

Versions of Svelte up to and including 5.55.6 are affected by this vulnerability.

If left unaddressed, this vulnerability could allow an attacker to exploit the regex, potentially leading to performance degradation or application crashes.

Yes, you can mitigate the risk by restricting the length of tags passed to <svelte:element>, ensuring that only safe, manageable lengths are processed.

Related vulnerabilities

Recent vulnerabilities recorded for svelte.

How To Fix

Latest published version: 5.57.2 as of 23 Oct 2026

npm install svelte@5.57.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.55.7

This is the first release that contains the fix.

npm install svelte@5.55.7

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback