CVE-2025-32388
mediumpriority · track · 0EPSS 0.003 · 23 %ileEUUSEPSS · scored 2026-10-27
SvelteKit is a framework for rapidly developing robust, performant web applications using Svelte. Prior to 2.20.6 , 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. This vulnerability is fixed in 2.20.6.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (2)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-6q87-84jw-cjhp@sveltejs/kit vulnerable to Cross-site Scripting via tracked search_params2025-04-14ghsa · osvUS
### 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`: ```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.
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (11)
External citations — patches, advisories, analysis.
- https://access.redhat.com/security/cve/cve-2025-32388cnnvd
- https://github.com/sveltejs/kit/commit/d3300c6a67908590266c363dba7b0835d9a194cfcnnvd
- https://github.com/sveltejs/kit/releasesPatchcnnvd
- https://github.com/sveltejs/kit/releases/tag/%40sveltejs%2Fkit%402.20.6cnnvd
- https://github.com/sveltejs/kit/security/advisories/GHSA-6q87-84jw-cjhpcnnvd
- https://github.com/sveltejs/kit/commit/d3300c6a67908590266c363dba7b0835d9a194cfenisa_euvd
- https://github.com/sveltejs/kit/releases/tag/%40sveltejs%2Fkit%402.20.6enisa_euvd
- https://github.com/sveltejs/kit/security/advisories/GHSA-6q87-84jw-cjhpenisa_euvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan