{"id":"CVE-2023-29003","published":"2023-04-04T21:20:43Z","modified":"2025-02-10T21:29:13Z","title":"SvelteKit has Insufficient Cross-Site Request Forgery Protection","vendor":"sveltejs","product":"kit","tier":"tail","description":{"text":"SvelteKit is a web development framework. 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.\n\nSvelteKit provides out-of-the-box cross-site request forgery (CSRF) protection to its users. While the implementation does a sufficient job in mitigating common CSRF attacks, prior to version 1.15.1, the protection can be bypassed by simply specifying a different `Content-Type` header value.\n\nIf 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.\n\nSvelteKit 1.15.1 updates the `is_form_content_type` function call in the CSRF protection logic to include `text/plain`. As additional hardening of the CSRF protection mechanism against potential method overrides, SvelteKit 1.15.1 is now performing validation on `PUT`, `PATCH` and `DELETE` methods as well. This latter hardening is only needed to protect users who have put in some sort of `?_method= override` feature themselves in their `handle` hook, so that the request that resolve sees could be `PUT`/`PATCH`/`DELETE` when the browser issues a `POST` request.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00557,"percentile":0.47332,"provenance":"source"},"cwes":[{"id":"CWE-352","name":"Cross-Site Request Forgery"},{"id":"CWE-184","name":"Incomplete List of Disallowed Inputs"}],"references":[{"url":"https://github.com/sveltejs/kit/security/advisories/GHSA-5p75-vc5g-8rv2","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/sveltejs/kit/commit/bb2253d51d00aba2e4353952d4fb0dcde6c77123","tags":["x_refsource_MISC"]},{"url":"https://github.com/sveltejs/kit/releases/tag/%40sveltejs%2Fkit%401.15.1","tags":["x_refsource_MISC"]}],"priority":{"score":15.6,"factors":[{"name":"EPSS percentile","points":9.47},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"sveltejs","affectedVersions":[{"vendor":"sveltejs","product":"kit","versions":["< 1.15.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2025-02-10T21:29:10.259849Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@sveltejs/kit","vulnerableRanges":["<1.15.1"],"patched":["1.15.1"],"from":["GHSA-5p75-vc5g-8rv2"],"provenance":"source"}],"summary":{"text":"SvelteKit, the web development framework's built-in CSRF protection in its +server.js REST endpoint handling, is insufficient before version 1.15.1 because it can be bypassed by specifying a different Content-Type header value. An attacker can exploit this by submitting malicious requests from a third-party domain, which requires user interaction (the victim must visit an attacker-controlled page while logged in) and no prior authentication by the attacker.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:26:04Z"},"euvd":{"id":"EUVD-2023-1208","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-sveltejs-kit-cve-2023-29003","children":[{"from":"CVE-2023-29003","to":"CVE-2023-29008","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@sveltejs/kit","fromFixed":"1.15.1","toFixed":"1.15.2","daysApart":2},{"kind":"same-code","provenance":"machine","files":["packages/kit/src/utils/http.js"],"commits":["https://github.com/sveltejs/kit/commit/bb2253d51d00aba2e4353952d4fb0dcde6c77123","https://github.com/sveltejs/kit/commit/ba436c6685e751d968a960fbda65f24cf7a82e9f"],"basis":"rarely changed file"},{"kind":"similar","provenance":"machine","score":0.48,"basis":"same product + description similarity"}]},{"from":"CVE-2023-29003","to":"CVE-2026-40074","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/kit/types/index.d.ts"],"commits":["https://github.com/sveltejs/kit/commit/bb2253d51d00aba2e4353952d4fb0dcde6c77123","https://github.com/sveltejs/kit/commit/10d7b44425c3d9da642eecce373d0c6ef83b4fcd"],"basis":"rarely changed file"}]},{"from":"CVE-2023-29003","to":"CVE-2026-66062","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/kit/src/utils/http.js"],"commits":["https://github.com/sveltejs/kit/commit/bb2253d51d00aba2e4353952d4fb0dcde6c77123","https://github.com/sveltejs/kit/commit/82712fc02c24b1dcf5b25d7a52129cd8455f04f5"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2023-29003","published":"2023-04-04","fixed":"1.15.1","kev":false},{"cve":"CVE-2023-29008","published":"2023-04-06","fixed":"1.15.2","kev":false},{"cve":"CVE-2024-23641","published":"2024-01-24","fixed":"2.4.3","kev":false},{"cve":"CVE-2024-53261","published":"2024-11-25","fixed":"2.8.3","kev":false}],"package":"npm:@sveltejs/kit"}}