Packages / @sveltejs/kit / Security
SvelteKit: Protocol-relative module import during server-side route resolution allows cross-origin script execution
Affected releases · @sveltejs/kit
- 3.x3.0.0 – 3.1.0Fixed in 3.1.1
- 2.x2.0.0 – 2.70.3Fixed in 2.70.4
- 1.x and older0.0.8 – 1.30.4No fix, no longer updated
On 3.x, the newest line:
npm install @sveltejs/kit@3.1.1Every release on a timeline
Affected
3.0.0 – 3.1.0
3 releases
Fixed
3.1.1 – 3.4.0
6 releases
Affected
2.0.0 – 2.70.3
237 releases
Fixed
2.70.4
1 release
Affected
1.0.0 – 1.30.4
128 releases
Affected
0.0.8 – 0.0.30
21 releases
What happens
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'.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.