Vulnerability library
Security checkApril 14, 2023

SvelteKit framework has Insufficient CSRF protection for CORS requests

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 its users. The protection is implemented at kit/src/runtime/server/respond.js.

Recommendation

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

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

References

Could your website be exposed too?

SmartScanner can check your website for SvelteKit framework has Insufficient CSRF protection for CORS requests and gives you actionable findings to investigate.

Start a free scan

Related Issues

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