---
id: "GHSA-rqp5-r3wg-vg35"
page: "https://infrastack.ai/live/GHSA-rqp5-r3wg-vg35"
kind: "vulnerability"
aliases: ["GHSA-rqp5-r3wg-vg35"]
title: "Protocol-relative module import during server-side route resolution allows cross-origin script execution"
severity: "medium"
cvss: 5.3
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: ["cwe-79", "npm", "package", "svelte", "sveltekit"]
not_affected_if: ["default-config", "no-server-route-resolution"]
published_at: "2026-10-29T23:47:38+00:00"
first_seen_at: "2026-11-09T22:53:15+00:00"
updated_at: "2026-11-09T22:56:36+00:00"
sources: [{"source": "ghsa-repo", "url": "https://github.com/sveltejs/kit/security/advisories/GHSA-rqp5-r3wg-vg35", "first_seen_at": "2026-11-09T22:53:15+00:00"}]
exploit_sources: []
---

# Protocol-relative module import during server-side route resolution allows cross-origin script execution

Link for people: https://infrastack.ai/live/GHSA-rqp5-r3wg-vg35 (this .md is for agents)

A crafted link can make SvelteKit's client-side navigation import and run a script from a different domain. An attacker who gets a user to click such a link can run code in that user's browser session.

_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

- Look for `router.resolution: 'server'` in the SvelteKit config file (`svelte.config.js`); apps without it are not affected.
- Check the installed version with `npm ls @sveltejs/kit`; versions `<= 2.70.3` and `>= 3.0.0 <= 3.1.0` are affected.

## 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-rqp5-r3wg-vg35

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/sveltejs/kit/security/advisories/GHSA-rqp5-r3wg-vg35

## From the sources

If an attacker could, using some form of social engineering or other exploit, get a user to use client-side navigation to navigate to a specially-crafted link, the attacker could cause code from another domain to be imported and run on the user's machine. This only affected apps with `router.resolution: 'server'`.

---

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