CVE-2024-23641 Sending a GET or HEAD request with a body crashes SvelteKit
Attackers can crash SvelteKit 2 applications by sending GET or HEAD requests with a body, requiring manual restarts to restore service.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-23641?
CVE-2024-23641 is a high-severity denial of service vulnerability in sveltejs kit, published on 24 Jan 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
SvelteKit is a web development kit. In SvelteKit 2, sending a GET request with a body eg `{}` to a built and previewed/hosted sveltekit app throws `Request with GET/HEAD method cannot have body.` and crashes the preview/hosting. After this happens, one must manually restart the app. `TRACE` requests will also cause the app to crash. Prerendered pages and SvelteKit 1 apps are not affected. `@sveltejs/adapter-node` versions 2.1.2, 3.0.3, and 4.0.1 and `@sveltejs/kit` version 2.4.3 contain a patch for this issue.
Weakness: CWE-20
Which versions are affected by CVE-2024-23641?
8 open source packages ship an affected version, including @sveltejs/kit and @sveltejs/adapter-node. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
@sveltejs/kit npm | From 2.0.0 | 2.4.3 |
@sveltejs/kit npm | From 2.0.0 | 2.4.3 |
@sveltejs/adapter-node npm | From 2.0.0 | 2.1.2 |
@sveltejs/adapter-node npm | From 2.0.0 | 2.1.2 |
@sveltejs/adapter-node npm | From 3.0.0 | 3.0.3 |
@sveltejs/adapter-node npm | From 3.0.0 | 3.0.3 |
2 more packages
@sveltejs/adapter-node npm | From 4.0.0 | 4.0.1 |
@sveltejs/adapter-node npm | From 4.0.0 | 4.0.1 |
Products include Svelte Adapter-Node, Svelte Kit.
How do I fix CVE-2024-23641?
Upgrade @sveltejs/kit to 2.4.3 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2024-23641 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-23641 exists.
Other vulnerabilities in sveltejs kit
Sources
Also known as GHSA-g5m6-hxpp-fc49.