Vulnerability library
Security checkSeptember 07, 2023

Svelte vulnerable to XSS when using objects during server-side rendering

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

The package svelte before 3.49.0 is vulnerable to Cross-site Scripting (XSS) due to improper input sanitization and to improper escape of attributes when using objects during SSR (Server-Side Rendering). Exploiting this vulnerability is possible via objects with a custom toString() function.

Recommendation

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

  • Affected version(s): < 3.49.0
  • Patched version(s): 3.49.0

References

Could your website be exposed too?

SmartScanner can check your website for Svelte vulnerable to XSS when using objects during server-side rendering and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated September 07, 2023