sveltekit-adapter-aws
sveltekit-adapter-aws copied to clipboard
chore(deps): update dependency @sveltejs/kit to v2.20.6 [security]
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| @sveltejs/kit (source) | 2.19.0 -> 2.20.6 |
||||
| @sveltejs/kit (source) | ^2.0.0 -> ^2.20.6 |
GitHub Vulnerability Alerts
CVE-2025-32388
Summary
Unsanitized search param names cause XSS vulnerability. You are affected if you iterate over all entries of event.url.searchParams inside a server load function. Attackers can exploit it by crafting a malicious URL and getting a user to click a link with said URL.
Details
SvelteKit tracks which parameters in event.url.searchParams are read inside server load functions. If the application iterates over the these parameters, the uses.search_params array included in the boot script (embedded in the server-rendered HTML) will have any search param name included in unsanitized form.
packages/kit/src/runtime/server/utils.js:150 has the stringify_uses(node) function which prints these out.
Reproduction
In a +page.server.js or +layout.server.js:
/** @​type {import('@​sveltejs/kit').Load} */
export function load(event) {
const values = {};
for (const key of event.url.searchParams.keys()) {
values[key] = event.url.searchParams.get(key);
}
}
If a user visits the page in question via a link containing ?</script/><script>window.pwned%3D1</script/>, the </script> will be included verbatim in the payload, causing the embedded script to be executed.
It is not necessary to return the parameter value from load or render it in the page, only to read it (which causes it to be tracked as a dependency) while load is running.
Impact
Any application that iterates over all values in event.url.searchParams in a load function in +page.server.js or +layout.server.js (directly or indirectly) is vulnerable to XSS.
Release Notes
sveltejs/kit (@βsveltejs/kit)
v2.20.6
Patch Changes
- fix: escape names of tracked search parameters (
d3300c6a67908590266c363dba7b0835d9a194cf)
v2.20.5
Patch Changes
-
allow
HandleServerErrorhook to accessgetRequestEvent(#β13666) -
fix: prevent Rollup warnings for undefined hooks (#β13687)
v2.20.4
Patch Changes
- chore: remove internal class-replacement hack that isn't needed anymore (#β13664)
v2.20.3
Patch Changes
- fix: only call
afterNavigateonce on app start when SSR is disabled (#β13593)
v2.20.2
Patch Changes
- fix: allow non-prerendered API endpoint calls during reroute when prerendering (#β13616)
v2.20.1
Patch Changes
- fix: avoid using top-level await (#β13607)
v2.20.0
Minor Changes
- feat: add
getRequestEventto$app/server(#β13582)
v2.19.2
Patch Changes
- fix: lazily load CSS for dynamically imported components (#β13564)
v2.19.1
Patch Changes
- fix: allow reroute to point to prerendered route (#β13575)
Configuration
π Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
π¦ Automerge: Disabled by config. Please merge this manually once you are satisfied.
β» Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
π Ignore: Close this PR and you won't be reminded about these updates again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.