# CVE-2023-29003: SvelteKit vulnerable to Cross-Site Request Forgery

Source: https://junglewise.ai/threats/cve-2023-29003-sveltekit-insufficient-cross-site-request-forgery-protection  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2023-04-04. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2023-29003 · Severity: high · CVSS 8.8 · Published 2023-04-04

SvelteKit is a popular web application framework used to build REST APIs and server endpoints. The framework includes built-in CSRF protection to prevent attackers from tricking users into submitting unwanted requests; however, this protection can be bypassed by using a text/plain Content-Type header, allowing attackers to perform unauthorized actions within a victim's session or account.

Technologies: [@sveltejs/kit (npm)](https://junglewise.ai/threats/technologies/sveltejs-kit), [SvelteKit](https://junglewise.ai/threats/technologies/sveltekit). Vendors: [npm](https://junglewise.ai/threats/vendors/npm), [Svelte](https://junglewise.ai/threats/vendors/svelte).

## 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

  ```sh
  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

## References

- [https://github.com/sveltejs/kit/security/advisories/GHSA-5p75-vc5g-8rv2](https://github.com/sveltejs/kit/security/advisories/GHSA-5p75-vc5g-8rv2)
- [https://github.com/sveltejs/kit/commit/bb2253d51d00aba2e4353952d4fb0dcde6c77123](https://github.com/sveltejs/kit/commit/bb2253d51d00aba2e4353952d4fb0dcde6c77123)
- [https://github.com/sveltejs/kit](https://github.com/sveltejs/kit)
- [https://github.com/sveltejs/kit/releases/tag/%40sveltejs%2Fkit%401.15.1](https://github.com/sveltejs/kit/releases/tag/%40sveltejs%2Fkit%401.15.1)

## Related threats

- [SvelteKit XSS via cache-control header in prerendered pages](https://junglewise.ai/threats/duplicate-advisory-sveltekit-before-3-0-0-xss-via-cache-control-header-5731f4e1)
- [SvelteKit open redirect in enhanced form actions](https://junglewise.ai/threats/duplicate-advisory-sveltekit-before-3-0-0-open-redirect-via-enhanced-9a8dcd94)
- [SvelteKit path traversal in vite preview server on Windows](https://junglewise.ai/threats/cve-2026-114063-sveltekit-sveltejs-kit-from-2-10-0-before-3-0-0-contains-a-path)
- [SvelteKit server-side request forgery in self-fetch fallbacks](https://junglewise.ai/threats/cve-2026-114062-sveltekit-before-3-0-0-contains-a-server-side-request-forgery)
- [SvelteKit cross-site scripting in prerendered pages](https://junglewise.ai/threats/cve-2026-114061-sveltekit-sveltejs-kit-before-3-0-0-contains-a-cross-site)
