sveltejs/svelte · Security
Svelte: ReDoS in `<svelte:element>` Tag Validation
- GHSA ID
- GHSA-9rmh-mm8f-r9h6
- CVE ID
- CVE-2026-42567
- Severity
- medium
- Published
- Updated
- CVSS v4
- 5.9 · 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
Description
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.
CWEs
- CWE-1333 · Inefficient Regular Expression Complexity