CVE-2023-29008: SvelteKit framework has Insufficient CSRF protection for CORS requests

Published Apr 6, 2023
·
Updated

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. While the implementation does a sufficient job of mitigating common CSRF attacks, the protection can be bypassed in versions prior to 1.15.2 by simply specifying an upper-cased Content-Type header value. The browser will not send uppercase characters, but this check does not block all expected CORS requests.

If abused, this issue will allow malicious requests to be submitted from third-party domains, which can allow execution of operations within the context of the victim's session, and in extreme scenarios can lead to unauthorized access to users’ accounts. This may lead to all POST operations requiring authentication being allowed in the following cases: If the target site sets SameSite=None on its auth cookie and the user visits a malicious site in a Chromium-based browser; if the target site doesn't set the SameSite attribute explicitly and the user visits a malicious site with Firefox/Safari with tracking protections turned off; and/or if the user is visiting a malicious site with a very outdated browser.

SvelteKit 1.15.2 contains a patch for this issue. It is also recommended to explicitly set SameSite to a value other than None on authentication cookies especially if the upgrade cannot be done in a timely manner.

Affected Software

1 affected component
svelte Sveltekit Node.js<1.15.2

Event History

Apr 6, 2023
CVE Published
via MITRE·04:36 PM
Data Sourced
via MITRE·04:36 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is CVE-2023-29008?

CVE-2023-29008 is a vulnerability in the SvelteKit framework that allows cross-site request forgery (CSRF) attacks.

2

How does SvelteKit protect against CSRF attacks?

SvelteKit provides out-of-the-box CSRF protection to its users.

3

What is the severity of CVE-2023-29008?

CVE-2023-29008 has a severity rating of 8.8 (high).

4

How can I fix CVE-2023-29008?

To fix CVE-2023-29008, update SvelteKit to version 1.15.3 or higher.

5

What is the Common Weakness Enumeration (CWE) ID associated with CVE-2023-29008?

The Common Weakness Enumeration (CWE) ID associated with CVE-2023-29008 are CWE-352 and CWE-918.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203