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

Published May 14, 2026
·
Updated

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.

Other sources

Svelte is a performance oriented web framework. From version 5.51.5 to before version 5.55.7, an internal regex in the Svelte runtime can take exponential time to test in <svelte:element this={tag}></svelte:element>. This issue has been patched in version 5.55.7.

MITRE

Affected Software

2 affected componentsFixes available
npm/svelte>=5.51.5<=5.55.6
5.55.7
svelte Svelte Node.js>=5.51.5<5.55.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/svelte to a version that resolves this vulnerability.

    Fixed in 5.55.7
  2. Configuration

    Only pass tag names from a predefined whitelist to <svelte:element this={tag}>. Reject or map any tag values that are not explicitly allowed.

    <svelte:element> usage allowed_tags = predetermined list
  3. Configuration

    Trim or validate the length of the tag string before passing it to <svelte:element this={tag}> to ensure tag values are constrained and cannot trigger the vulnerable regex.

    <svelte:element> usage max_tag_length = trimmed to a safe length

Event History

May 14, 2026
Advisory Published
via GitHub·08:29 PM
Data Sourced
via GitHub·08:29 PM
DescriptionWeaknessAffected Software
Jun 9, 2026
CVE Published
via MITRE·04:22 PM
Data Sourced
via MITRE·04:22 PM
DescriptionWeakness
Data Sourced
via NVD·05:17 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-42567?

CVE-2026-42567 has a medium severity rating due to the potential for denial of service from regex performance issues.

2

How do I fix CVE-2026-42567?

To fix CVE-2026-42567, upgrade to Svelte version 5.55.7 or later.

3

What causes CVE-2026-42567?

CVE-2026-42567 is caused by an internal regex in the Svelte runtime that can lead to exponential time complexity when processing unconstrained tags.

4

Am I vulnerable to CVE-2026-42567 if I restrict tag length?

No, if your application restricts tag length or only allows a predetermined list of tags, you are not vulnerable to CVE-2026-42567.

5

Which versions of Svelte are affected by CVE-2026-42567?

CVE-2026-42567 affects Svelte versions between 5.51.5 and 5.55.6, inclusive.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203