CVE-2024-23641
published 2024-01-24CVE-2024-23641: 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…
PriorityP339high7.5CVSS 3.1
AVNACLPRNUINSUCNINAH
EPSS
0.76%
51.1th percentile
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.
Affected
12 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| svelte | adapter-node | — | — |
| svelte | adapter-node | >= 2.0.0 < 2.1.2 | 2.1.2 |
| svelte | adapter-node | >= 3.0.0 < 3.0.3 | 3.0.3 |
| svelte | kit | >= 2.0.0 < 2.4.3 | 2.4.3 |
| sveltejs | adapter-node | >= 2.0.0 < 2.1.2 | 2.1.2 |
| sveltejs | adapter-node | >= 3.0.0 < 3.0.3 | 3.0.3 |
| sveltejs | adapter-node | >= 4.0.0 < 4.0.1 | 4.0.1 |
| sveltejs | kit | — | — |
| sveltejs | kit | — | — |
| sveltejs | kit | — | — |
| sveltejs | kit | — | — |
| sveltejs | kit | >= 2.0.0 < 2.4.3 | 2.4.3 |
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
Sending a GET or HEAD request with a body crashes SvelteKit
ghsa·2024-01-24
CVE-2024-23641 [HIGH] CWE-20 Sending a GET or HEAD request with a body crashes SvelteKit
Sending a GET or HEAD request with a body crashes SvelteKit
### Summary
In SvelteKit 2 sending a GET request with a body eg `{}` to a SvelteKit app in preview or with `adapter-node` throws `Request with GET/HEAD method cannot have body.` and crashes the app.
```
node:internal/deps/undici/undici:6066
throw new TypeError("Request with GET/HEAD method cannot have body.");
^
TypeError: Request with GET/HEAD method cannot have body.
at new Request (node:internal/deps/undici/undici:6066:17)
at getRequest (file:///C:/Users/admin/Desktop/reproduction/node_modules/@sveltejs/kit/src/exports/node/index.js:107:9)
at file:///C:/Users/admin/Desktop/reproduction/node_modules/@sveltejs/kit/src/exports/vite/preview/index.js:181:26
at call (file:///C:/Users/admin/Desktop/reproduction/node_modules/vite/di
OSV
Sending a GET or HEAD request with a body crashes SvelteKit
osv·2024-01-24
CVE-2024-23641 [HIGH] Sending a GET or HEAD request with a body crashes SvelteKit
Sending a GET or HEAD request with a body crashes SvelteKit
### Summary
In SvelteKit 2 sending a GET request with a body eg `{}` to a SvelteKit app in preview or with `adapter-node` throws `Request with GET/HEAD method cannot have body.` and crashes the app.
```
node:internal/deps/undici/undici:6066
throw new TypeError("Request with GET/HEAD method cannot have body.");
^
TypeError: Request with GET/HEAD method cannot have body.
at new Request (node:internal/deps/undici/undici:6066:17)
at getRequest (file:///C:/Users/admin/Desktop/reproduction/node_modules/@sveltejs/kit/src/exports/node/index.js:107:9)
at file:///C:/Users/admin/Desktop/reproduction/node_modules/@sveltejs/kit/src/exports/vite/preview/index.js:181:26
at call (file:///C:/Users/admin/Desktop/reproduction/node_modules/vite/di
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/sveltejs/kit/commit/af34142631c876a7eb62ff81f71e8a3f90dafee9https://github.com/sveltejs/kit/security/advisories/GHSA-g5m6-hxpp-fc49https://github.com/sveltejs/kit/commit/af34142631c876a7eb62ff81f71e8a3f90dafee9https://github.com/sveltejs/kit/security/advisories/GHSA-g5m6-hxpp-fc49
2024-01-24
Published