GHSA-j62c-4x62-9r35 CVE-2025-67647
SvelteKit is vulnerable to denial of service and possible SSRF when using prerendering
- Severity
- 0.0 / 10
- Critical · CVSS 4.0
- Exploit chance (EPSS)
- 0.52%
- Chance of exploitation in the next 30 days. Higher than 44.00% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-248 Uncaught Exception
- CWE-400 Uncontrolled Resource Consumption
- CWE-918 Server-Side Request Forgery (SSRF)
- Fix
- Available
- 2 packages have a fixed version
Description
Summary
Versions of SvelteKit are vulnerable to a server side request forgery (SSRF) and denial of service (DoS) under certain conditions.
Details
Affected versions from 2.44.0 onwards are vulnerable to DoS if:
- your app has at least one prerendered route (
export const prerender = true)
Affected versions from 2.19.0 onwards are vulnerable to DoS and SSRF if:
- your app has at least one prerendered route (
export const prerender = true) - AND you are using
adapter-nodewithout a configuredORIGINenvironment variable, and you are not using a reverse proxy that implements Host header validation
Impact
The DoS causes the running server process to end.
The SSRF allows access to internal services that can be reached without authentication when fetched from SvelteKit's server runtime.
It is also possible to obtain an SXSS via cache poisoning, by forcing a potential CDN to cache an XSS returned by the attacker's server (the latter being able to specify the cache-control of their choice).
Credits
Affected versions
npm
| Package | Vulnerable | Fixed in |
|---|---|---|
| @sveltejs/adapter-node | >= 5.4.1, < 5.5.1 |
5.5.1 |
| @sveltejs/kit | >= 2.19.0, < 2.49.5 |
2.49.5 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
@sveltejs/adapter-node npm → 5.5.1
- npm
npm install @sveltejs/adapter-node@5.5.1- yarn
yarn add @sveltejs/adapter-node@5.5.1- pnpm
pnpm add @sveltejs/adapter-node@5.5.1
@sveltejs/kit npm → 2.49.5
- npm
npm install @sveltejs/kit@2.49.5- yarn
yarn add @sveltejs/kit@2.49.5- pnpm
pnpm add @sveltejs/kit@2.49.5
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:H/SC:L/SI:L/SA:N
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- Present
- Privileges required
- None
- User interaction
- None
- Confidentiality (vulnerable system)
- High
- Integrity (vulnerable system)
- Low
- Availability (vulnerable system)
- High
- Confidentiality (subsequent systems)
- Low
- Integrity (subsequent systems)
- Low
- Availability (subsequent systems)
- None
CVSS 3.1 9.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- High
Weakness
CWE-248: Uncaught Exception
An exception is thrown from a function, but it is not caught.
CWE-400: Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource.
How to prevent it
- Architecture and Design: Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.
- Architecture and Design: Mitigation of resource exhaustion attacks requires that the target system either: recognizes the attack and denies that user further access for a given amount of time, or uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed. The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question. The second solution is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.
- Architecture and Design: Ensure that protocols have specific limits of scale placed on them.
- Implementation: Ensure that all failures in resource allocation place the system into a safe posture.
CWE-918: Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-27mw-82g8-phjj SvelteKit : XSS via untrusted cache-control header in prerendered page | Low | Also affects @sveltejs/kit |
| GHSA-pfhg-q3qv-9q6r SvelteKit: URL redirection to untrusted site via enhanced form submission | Medium | Also affects @sveltejs/kit |
| GHSA-29g2-3rmr-qm68 SvelteKit: ReDoS (O(n^2)) in content negotiation — unauthenticated DoS via the Accept header | Medium | Also affects @sveltejs/kit |
| GHSA-866w-xmhq-wj7x SvelteKit: Prototype pollution in file input deletion path in remote-function forms | Medium | Also affects @sveltejs/kit |
| GHSA-wqjv-9729-c5q2 SvelteKit: Big remote form function payloads can cause Node process to crash | Medium | Also affects @sveltejs/kit |
| GHSA-hgv7-v322-mmgr @sveltejs/kit: `query.batch` cross-talk | Medium | Also affects @sveltejs/kit |
| GHSA-3f6h-2hrp-w5wx @sveltejs/kit: Unvalidated redirect in handle hook causes Denial-of-Service | High | Also affects @sveltejs/kit |
| GHSA-2crg-3p73-43xp @sveltejs/adapter-node has a BODY_SIZE_LIMIT bypass | High | Also affects @sveltejs/kit |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor