@sveltejs/kit is vulnerable to Cross-Site Request Forgery (CSRF)
53
Medium Risk
SvelteKit enforces its built-in cross-site origin and CSRF protection in respond.js only inside a block gated on a development check. Because that check is resolved from NODE_ENV in bundled apps, building a server with any non-production NODE_ENV value compiles the origin and form-submission checks out of the deployed application. As a result, forged cross-site form submissions and cross-origin remote-function requests are processed instead of being rejected with a 403, exposing state-changing endpoints to cross-site request forgery. The fix gates the enforcement on a build-time development constant so the protection stays active in every non-vite dev build regardless of NODE_ENV.
You are affected if you are using a version that falls within the vulnerable range and your application server is built with a non-production NODE_ENV value (for example NODE_ENV=staging vite build).
@sveltejs/kit is vulnerable to Cross-Site Request Forgery (CSRF) in versions 2.36.3 - 2.69.3.
Upgrade the @sveltejs/kit library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant