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

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Jan 2024
- **Updated:** 13 Nov 2024
- **Also known as:** GHSA-g5m6-hxpp-fc49

## 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 (Improper Input Validation)

## 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 | Ecosystem | 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 |
| `@sveltejs/adapter-node` | npm | From 4.0.0 | 4.0.1 |
| `@sveltejs/adapter-node` | npm | From 4.0.0 | 4.0.1 |

Products: Svelte Adapter-Node, Svelte Kit.

## How do I fix CVE-2024-23641?

Upgrade @sveltejs/kit to 2.4.3 or later.

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

- [CVE-2025-67647](https://insights.sbomify.com/CVE-2025-67647/): SvelteKit Denial of service and possible SSRF when using prerendering (high 8.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-23641 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-23641 exists.

Affected packages and fixed versions:
- @sveltejs/kit (npm): affected from 2.0.0; fixed in 2.4.3
- @sveltejs/kit (npm): affected from 2.0.0; fixed in 2.4.3
- @sveltejs/adapter-node (npm): affected from 2.0.0; fixed in 2.1.2
- @sveltejs/adapter-node (npm): affected from 2.0.0; fixed in 2.1.2
- @sveltejs/adapter-node (npm): affected from 3.0.0; fixed in 3.0.3
- @sveltejs/adapter-node (npm): affected from 3.0.0; fixed in 3.0.3
- @sveltejs/adapter-node (npm): affected from 4.0.0; fixed in 4.0.1
- @sveltejs/adapter-node (npm): affected from 4.0.0; fixed in 4.0.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-23641/ (Markdown: https://insights.sbomify.com/CVE-2024-23641/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-23641
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-23641
- OSV: https://osv.dev/vulnerability/CVE-2024-23641

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-23641/
Summaries are generated and may contain mistakes; the official description above is the record.
