Vulnerability library
Security checkApril 06, 2023

SvelteKit vulnerable to Cross-Site Request Forgery

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

High 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

The SvelteKit framework offers developers an option to create simple REST APIs. This is done by defining a +server.js file, containing endpoint handlers for different HTTP methods.

SvelteKit provides out-of-the-box cross-site request forgery (CSRF) protection to it’s users. The protection is implemented at kit/src/runtime/server/respond.js#L52.

Recommendation

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

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

References

Could your website be exposed too?

SmartScanner can check your website for SvelteKit vulnerable to Cross-Site Request Forgery and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated April 06, 2023