Servers and applications
GHSA-mqj6-p822-rq2j
SvelteKit CSRF origin check does not cover some browser-generated requests to `+server` endpoints
- Severity
- Low 3.1
- Published
- 25 Nov 2026
- Last changed
- 25 Nov 2026
- Added to UpHeron
- 25 Nov 2026
- Fixed in
- 3.4.1
- Attack
- Over the network · Only under certain conditions · No login needed · Needs someone to click or open something
- Attacker can
- Change some data
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N- Sources
- Project advisories (GitHub)
Description
SvelteKit's built-in CSRF protection checks the Origin header of cross-site POST, PUT, PATCH and DELETE requests whose content type a browser can send without a CORS preflight. Some browser-generated requests, such as those sent by hyperlink auditing (), use a content type that was not covered by this check. As a result, such requests could reach +server` endpoint handlers without the origin check.
The impact is low. An application is only affected if all of the following are true:
- It has a +server endpoint that performs a state-changing action on POST, PUT, PATCH or DELETE without reading or validating the request body (the body of these requests is fixed and cannot be controlled).
- It authenticates that endpoint with cookies.
- For cross-site requests: the session cookie is set with SameSite=None and the user's browser sends third-party cookies.
Workarounds
Reject cross-origin state-changing requests in a handle hook, or in the affected endpoints, by checking that the Origin header matches your application's origin. Alternatively, require a request body or a custom request header for state-changing endpoints, or use SameSite=Lax or SameSite=Strict session cookies.
Affected software
| Software | Affected versions |
|---|---|
SvelteKitServers and applications · github:sveltejs/kit |
|
About SvelteKit
web development, streamlined
- Weekly downloads (npm)
- 5,128,894npm, 22 Nov 2026
- GitHub stars
- 20,926GitHub, 22 Nov 2026
- Forks
- 2,391GitHub, 22 Nov 2026
- Latest release
- @sveltejs/[email protected]GitHub, 22 Nov 2026
- Released
- 18 Nov 2026GitHub
- License
- MITGitHub
- First published on GitHub
- 15 Oct 2020GitHub
Vulnerabilities in SvelteKit
- In our list
- 38
- Published in the last 12 months
- 33
- Critical, last 12 months
- 0
- High, last 12 months
- 6
- Known exploited
- 0
- GHSA-59wf-wmcq-r5j8Memory exhaustion when reading remote functions `form` request bodies (experimental only)Medium 25 Nov 2026
- GHSA-c35j-4mwc-3m4jRepeated issue processing in remote form SSR can cause denial of service (experimental only)Medium 25 Nov 2026
- GHSA-ggm8-cv6q-2c35Stack trace handling in production can be made to read arbitrary server files, enabling DoSHigh 25 Nov 2026
- GHSA-5r92-qw5m-rwrrUnbounded array lengths in data parsed from a remote functions `form` enable DoSMedium 25 Nov 2026
- GHSA-x35v-76jc-m8f5ReDoS in SvelteKit route matching for routes with multiple paramsMedium 5.9 25 Nov 2026
- GHSA-cwcj-gpp3-m57mResponses with immutable headers crash adapter-node when `reroute` changes the pathname in apps without server routesLow 25 Nov 2026
References
- GitHub Advisory Database https://github.com/advisories/GHSA-mqj6-p822-rq2j
- github.com https://github.com/sveltejs/kit/security/advisories/GHSA-mqj6-p822-rq2j