---
id: "GHSA-mw6w-2fmv-pvw3"
page: "https://infrastack.ai/live/GHSA-mw6w-2fmv-pvw3"
kind: "vulnerability"
aliases: ["GHSA-mw6w-2fmv-pvw3"]
title: "Unhandled URIError when `reroute` rewrites a malformed pathname crashes adapter-node"
severity: "medium"
cvss: 5.9
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "@sveltejs/kit", "note": "<=2.70.3, >= 3.0.0, <= 3.1.0", "fixed": ["2.70.4", "3.1.1"], "affected": "<= 2.70.3, >= 3.0.0, <= 3.1.0", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["adapter-node", "cwe-248", "node", "package", "self-hosted", "sveltekit"]
not_affected_if: ["managed-hosting", "no-reroute-hook", "static-export"]
published_at: "2026-10-29T23:47:35+00:00"
first_seen_at: "2026-11-09T22:53:15+00:00"
updated_at: "2026-11-09T22:56:11+00:00"
sources: [{"source": "ghsa-repo", "url": "https://github.com/sveltejs/kit/security/advisories/GHSA-mw6w-2fmv-pvw3", "first_seen_at": "2026-11-09T22:53:15+00:00"}]
exploit_sources: []
---

# Unhandled URIError when `reroute` rewrites a malformed pathname crashes adapter-node

Link for people: https://infrastack.ai/live/GHSA-mw6w-2fmv-pvw3 (this .md is for agents)

When the reroute hook turns an invalid percent-encoded path into a valid one, an unhandled URIError can crash the SvelteKit server built with adapter-node. An attacker who sends such a request can take the server down, causing a denial of service.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:@sveltejs/kit affected <= 2.70.3, >= 3.0.0, <= 3.1.0 fixed 2.70.4, 3.1.1

## How to check

- Check the installed version of `@sveltejs/kit` in `package.json` and the lockfile.
- Look for a `reroute` hook in `src/hooks.js` or `src/hooks.ts`.
- Confirm the app deploys with `@sveltejs/adapter-node`.

## Fix

- `@sveltejs/kit` `2.70.4` for the 2.x line
- `@sveltejs/kit` `3.1.1` for the 3.x line

## Timeline

- 2026-11-09T22:53:15+00:00 ghsa-repo https://github.com/sveltejs/kit/security/advisories/GHSA-mw6w-2fmv-pvw3

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/sveltejs/kit/security/advisories/GHSA-mw6w-2fmv-pvw3

## From the sources

When `reroute` turned an invalid percent-encoded path into a valid path, it could potentially trigger a comparison that would crash the server.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
