Quick answers
- Is CVE-2023-29003 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2023-29003 being exploited in the wild.
- How severe is CVE-2023-29003?
- High severity, with a CVSS score of 8.8, published 4 April 2023.
- Which products and versions are affected?
- @sveltejs/kit (npm) < 1.15.1, SEMVER:introduced=0,fixed=1.15.1.
- Is there a fix for CVE-2023-29003?
- Yes. @sveltejs/kit (npm): upgrade to 1.15.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2023-29003 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2023-29003?
- Check whether you run @sveltejs/kit (npm) or SvelteKit at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- @sveltejs/kit (npm): upgrade to 1.15.1 or later
npm install @sveltejs/kit@1.15.1
Technical details
SvelteKit's CSRF protection (in kit/src/runtime/server/respond.js#L52) validates POST requests from cross-origin sources by checking the Origin header and Content-Type. The vulnerability exists in the is_form_content_type validation function (kit/src/utils/http.js#L71), which only blocks requests with Content-Type values of application/x-www-form-urlencoded or multipart/form-data. An attacker can bypass this protection by sending a cross-origin POST request with Content-Type: text/plain, which will pass the validation and be processed by the endpoint handler. This allows execution of operations within the context of the victim's authenticated session, potentially leading to account compromise. SvelteKit 1.15.1 patches the vulnerability by expanding the blocked Content-Type list to include text/plain and adding validation for PUT, PATCH, and DELETE methods to harden the protection against potential method-override attacks.
Affected products
- Svelte @sveltejs/kit < 1.15.1
Identifiers
- CVE-2023-29003
- GHSA-5p75-vc5g-8rv2
Timeline
- 2023-04-04: disclosed: Advisory GHSA-5p75-vc5g-8rv2 published
- 2023-04-04: patched: SvelteKit 1.15.1 released with fix