# CVE-2024-53261: SvelteJS Kit cross-site scripting in dev mode 404 page

Source: https://junglewise.ai/threats/cve-2024-53261-sveltejs-kit-cross-site-scripting-in-dev-mode-404-page  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-11-25. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2024-53261 · Severity: low · CVSS 3.1 · Published 2024-11-25

SvelteJS Kit is a framework for building web applications. During development, the 404 error page fails to sanitize malicious input from the URL, allowing an attacker to inject JavaScript code that executes in a developer's browser. While the development server is not typically exposed to the network, an attacker could trick a developer into clicking a malicious link, potentially compromising their local development environment.

Technologies: [@sveltejs/kit (npm)](https://junglewise.ai/threats/technologies/sveltejs-kit). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2024-53261 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-53261 being exploited in the wild.

**How severe is CVE-2024-53261?** Low severity, with a CVSS score of 3.1, published 25 November 2024.

**Which products and versions are affected?** @sveltejs/kit (npm) SEMVER:introduced=0,fixed=2.8.3.

**Is there a fix for CVE-2024-53261?** Yes. @sveltejs/kit (npm): upgrade to 2.8.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2024-53261 attacked?** It is attacked from the adjacent network.

**Am I affected by CVE-2024-53261?** Check whether you run @sveltejs/kit (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @sveltejs/kit (npm): upgrade to 2.8.3 or later

  ```sh
  npm install @sveltejs/kit@2.8.3
  ```


## Technical details

This is a cross-site scripting (XSS) vulnerability in SvelteJS Kit's development mode. Unsanitized user input from the request URL flows into the 404 error page rendering logic in packages/kit/src/exports/vite/dev/index.js (line 437), propagates through packages/kit/src/exports/vite/utils.js (line 91), and is output in the HTML page without proper sanitization. The vulnerability requires user interaction (the developer must click a malicious link) and is restricted to the adjacent network attack vector. While the impact is low (development servers are not network-exposed by default, and dev databases lack sensitive data), an attacker could craft a malicious URL to execute arbitrary JavaScript in a developer's browser during development. The vulnerability is fixed in version 2.8.3 and later.

## Affected products

- SvelteJS Kit < 2.8.3

## Identifiers

- CVE-2024-53261
- GHSA-rjjv-87mx-6x3h

## Timeline

- 2024-11-25: disclosed
- 2024-11-25: patched: Version 2.8.3 released

## References

- [https://github.com/sveltejs/kit/security/advisories/GHSA-rjjv-87mx-6x3h](https://github.com/sveltejs/kit/security/advisories/GHSA-rjjv-87mx-6x3h)

## Related threats

- [SvelteKit XSS via cache-control header in prerendered pages](https://junglewise.ai/threats/duplicate-advisory-sveltekit-before-3-0-0-xss-via-cache-control-header-5731f4e1)
- [SvelteKit open redirect in enhanced form actions](https://junglewise.ai/threats/duplicate-advisory-sveltekit-before-3-0-0-open-redirect-via-enhanced-9a8dcd94)
- [SvelteKit cross-site scripting in prerendered pages](https://junglewise.ai/threats/cve-2026-114061-sveltekit-sveltejs-kit-before-3-0-0-contains-a-cross-site)
- [SvelteKit open redirect in enhanced form actions](https://junglewise.ai/threats/cve-2026-114060-sveltekit-sveltejs-kit-before-3-0-0-contains-an-open-redirect)
- [SvelteKit CPU exhaustion in remote form deserialization](https://junglewise.ai/threats/cve-2026-82261-sveltekit-cpu-exhaustion-in-remote-form-deserialization)
