MEDIUM5.9
GHSA-9rmh-mm8f-r9h6
Svelte: ReDoS in `<svelte:element>` Tag Validation
Quick fix
GHSA-9rmh-mm8f-r9h6 — svelte: upgrade to the fixed version with the command below.
npm install svelte@5.55.7Details
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.
Are you affected?
Enter the version of the package you're using.
Affected packages
References
Check it before you install it
One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.
curl -s https://vdb.ai.kr/v1/ai/check-packages \
-H 'Content-Type: application/json' \
-d '{"packages":["pkg:npm/svelte"]}'