Vulnerabilities/

Svelte: ReDoS in `<svelte:element>` Tag Validation

Severity:
Medium

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.

Recommendation

Update the svelte package to the latest compatible version. Followings are version details:

References

Related Issues

Tags:
npm
svelte
Anything's wrong? Let us know Last updated on May 14, 2026