Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Apr 14, 2025

This PR contains the following updates:

Package Change Age Confidence
@sveltejs/kit (source) 2.20.5 -> 2.20.6 age confidence

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

Compare Source

Patch Changes

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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 this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from benjaminstrasser as a code owner April 14, 2025 21:55
@renovate renovate bot added the renovate label Apr 14, 2025
@renovate renovate bot requested review from jjnp, mledl and sjaghori as code owners April 14, 2025 21:55
@renovate renovate bot enabled auto-merge (squash) April 14, 2025 21:55
@renovate
Copy link
Contributor Author

renovate bot commented Apr 14, 2025

Branch automerge failure

This PR was configured for branch automerge. However, this is not possible, so it has been raised as a PR instead.


  • Branch has one or more failed status checks

@renovate renovate bot force-pushed the renovate/npm-sveltejs-kit-vulnerability branch 4 times, most recently from fdbe58f to 3031d3b Compare April 21, 2025 07:07
@renovate renovate bot force-pushed the renovate/npm-sveltejs-kit-vulnerability branch 6 times, most recently from f775efe to 563b951 Compare May 4, 2025 17:22
@renovate renovate bot force-pushed the renovate/npm-sveltejs-kit-vulnerability branch 9 times, most recently from 8e3fc09 to 5efd76f Compare May 11, 2025 21:36
@renovate renovate bot force-pushed the renovate/npm-sveltejs-kit-vulnerability branch 4 times, most recently from 5e43f44 to bb697a6 Compare May 12, 2025 22:24
@renovate renovate bot force-pushed the renovate/npm-sveltejs-kit-vulnerability branch 4 times, most recently from 787ff5f to a52272f Compare September 21, 2025 21:34
@renovate renovate bot force-pushed the renovate/npm-sveltejs-kit-vulnerability branch 5 times, most recently from 6fc3b79 to e052217 Compare September 28, 2025 20:54
@renovate renovate bot force-pushed the renovate/npm-sveltejs-kit-vulnerability branch 6 times, most recently from 6c79ca5 to 7be9ff2 Compare October 6, 2025 00:47
@renovate renovate bot force-pushed the renovate/npm-sveltejs-kit-vulnerability branch 7 times, most recently from d030072 to f708344 Compare October 13, 2025 04:40
@renovate renovate bot force-pushed the renovate/npm-sveltejs-kit-vulnerability branch 6 times, most recently from 4ea6877 to 16334d6 Compare October 20, 2025 16:39
@renovate renovate bot force-pushed the renovate/npm-sveltejs-kit-vulnerability branch from 16334d6 to 284dec9 Compare October 22, 2025 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants