CVE-2024-23641 Sending a GET or HEAD request with a body crashes SvelteKit

High 7.5 Published Updated

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.

PackageAffectedFixed in
@sveltejs/kit npmFrom 2.0.02.4.3
@sveltejs/kit npmFrom 2.0.02.4.3
@sveltejs/adapter-node npmFrom 2.0.02.1.2
@sveltejs/adapter-node npmFrom 2.0.02.1.2
@sveltejs/adapter-node npmFrom 3.0.03.0.3
@sveltejs/adapter-node npmFrom 3.0.03.0.3
2 more packages
@sveltejs/adapter-node npmFrom 4.0.04.0.1
@sveltejs/adapter-node npmFrom 4.0.04.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.

Sources

Also known as GHSA-g5m6-hxpp-fc49.

Is CVE-2024-23641 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free