Vulnerability library
Security checkFebruary 26, 2026

Svelte: XSS via HTML Comment Injection in SSR Error Boundary Hydration Markers

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmsvelte

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

Errors from transformError were not correctly escaped prior to being embedded in the HTML output, causing potential HTML injection and XSS if attacker-controlled content is returned from transformError.

Recommendation

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

  • Affected version(s): >= 5.53.0, < 5.53.5
  • Patched version(s): 5.53.5

References

Could your website be exposed too?

SmartScanner can check your website for Svelte: XSS via HTML Comment Injection in SSR Error Boundary Hydration Markers and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated February 26, 2026