Vulnerability library
Security checkOctober 23, 2026

SvelteKit : XSS via untrusted cache-control header in prerendered page

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

Low 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

Applications that prerender pages and use setHeaders to set a cache-control header from an untrusted source are vulnerable to cross-site scripting (XSS).

SvelteKit inserts the header value into a <meta http-equiv="cache-control"> tag without escaping it.

Recommendation

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

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

References

Could your website be exposed too?

SmartScanner can check your website for SvelteKit : XSS via untrusted cache-control header in prerendered page and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated October 23, 2026