Vulnerability GHSA-g5m6-hxpp-fc49
High Risk
HIGH RISK
CVSS Score: 7.5
Score Range: 7.0–8.9
High severity vulnerabilities (CVSS 7.0–8.9). Serious vulnerabilities that should be prioritized soon after critical fixes.
2 years ago
January 24, 2024 at 02:22 PM UTC
Sending a GET or HEAD request with a body crashes SvelteKit
2.0.0 - 2.1.1 and 3.0.0 - 3.0.2 and 4.0.0
2.0.0 - 2.1.1 and 3.0.0 - 3.0.2 and 4.0.0
Summary
Sending a GET or HEAD request with a body crashes SvelteKit
Details
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/dist/node/chunks/dep-9A4-l-43.js:44795:7)
at next (file:///C:/Users/admin/Desktop/reproduction/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:44739:5)
at file:///C:/Users/admin/Desktop/reproduction/node_modules/@sveltejs/kit/src/exports/vite/preview/index.js:172:6
at call (file:///C:/Users/admin/Desktop/reproduction/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:44795:7)
at next (file:///C:/Users/admin/Desktop/reproduction/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:44739:5)
at file:///C:/Users/admin/Desktop/reproduction/node_modules/@sveltejs/kit/src/exports/vite/preview/index.js:211:27
at call (file:///C:/Users/admin/Desktop/reproduction/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:44795:7)
Node.js v20.11.0
TRACE requests will also cause the app to crash. Prerendered pages and SvelteKit 1 apps are not affected.
PoC
First do a fresh install of SvelteKit 2 with the example app. Typescript.
npm run buildnpm run preview- Go to http://localhost:4173 (works)
- curl -X GET -d "{}" http://localhost:4173/bye
- Application crashes and http://localhost:4173 is down
Impact
Denial of Service for apps using adapter-node
Related Vulnerabilities
Other vulnerabilities affecting the same packages
Medium Risk
5 hours ago
SvelteKit: `@sveltejs/adapter-node` crashes when proxying certain requests via `fetch`
5.5.7 and 6.0.0-next.0 - 6.0.0 GHSA-rqw3-x7hx-mm3p
5.5.7 and 6.0.0-next.0 - 6.0.0 GHSA-rqw3-x7hx-mm3p
Medium Risk
21 days ago
SvelteKit: URL redirection to untrusted site via enhanced form submission
<3.0.0 GHSA-pfhg-q3qv-9q6r
<3.0.0 GHSA-pfhg-q3qv-9q6r
Low Risk
21 days ago
SvelteKit : XSS via untrusted cache-control header in prerendered page
<3.0.0 GHSA-27mw-82g8-phjj
<3.0.0 GHSA-27mw-82g8-phjj
Medium Risk
3 months ago
SvelteKit: ReDoS (O(n^2)) in content negotiation — unauthenticated DoS via the Accept header
<2.70.2 GHSA-29g2-3rmr-qm68
<2.70.2 GHSA-29g2-3rmr-qm68
Medium Risk
3 months ago
SvelteKit: Prototype pollution in file input deletion path in remote-function forms
<2.69.1 GHSA-866w-xmhq-wj7x
<2.69.1 GHSA-866w-xmhq-wj7x
Impacted packages
Timeline
Published
2 years ago
January 24, 2024 at 02:22 PM UTC
Fixed (2.1.2)
2 years ago
January 22, 2024 at 10:10 PM UTC
Fixed (3.0.3)
2 years ago
January 22, 2024 at 10:20 PM UTC
Fixed (4.0.1)
2 years ago
January 22, 2024 at 10:48 PM UTC
Last Modified
2 months ago
September 10, 2026 at 03:50 AM UTC