Vulnerability library
Security checkApril 16, 2025

@sveltejs/kit vulnerable to Cross-site Scripting via tracked search_params

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

Medium severitynpm@sveltejs/kit

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

Unsanitized search param names cause XSS vulnerability. You are affected if you iterate over all entries of event.url.searchParams inside a server load function. Attackers can exploit it by crafting a malicious URL and getting a user to click a link with said URL.

Recommendation

Update the @sveltejs/kit package to the latest compatible version. Followings are version details:

  • Affected version(s): >= 2.0.0, < 2.20.6
  • Patched version(s): 2.20.6

References

Could your website be exposed too?

SmartScanner can check your website for @sveltejs/kit vulnerable to Cross-site Scripting via tracked search_params and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated April 16, 2025