{"id":"CVE-2025-32388","aliases":["CVE-2025-32388","GHSA-6q87-84jw-cjhp"],"related":[],"kind":"vulnerability","state":"published","title":"SvelteKit allows XSS via tracked search_params","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nUnsanitized 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.\n\n### Details\n\nSvelteKit 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.\n\n`packages/kit/src/runtime/server/utils.js:150` has the `stringify_uses(node)` function which prints these out.\n\n### Reproduction\n\nIn a `+page.server.js` or `+layout.server.js`:\n\n```js\n/** @type {import('@sveltejs/kit').Load} */\nexport function load(event) {\n  const values = {};\n\n  for (const key of event.url.searchParams.keys()) {\n    values[key] = event.url.searchParams.get(key);\n  }\n}\n```\n\nIf 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.\n\nIt 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.\n\n### Impact\n\nAny 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"SvelteKit es un framework para desarrollar rápidamente aplicaciones web robustas y de alto rendimiento con Svelte. Antes de la versión 2.20.6, los nombres de parámetros de búsqueda sin sanear causaban una vulnerabilidad XSS. Se ve afectado si se itera sobre todas las entradas de event.url.searchParams dentro de una función de carga del servidor. Los atacantes pueden explotar esta vulnerabilidad manipulando una URL maliciosa y haciendo que el usuario haga clic en un enlace con dicha URL. Esta vulnerabilidad se corrigió en la versión 2.20.6.","source":"nvd"}],"published":"2025-04-14T19:10:42.000Z","modified":"2026-06-17T09:11:55.317Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 2.0.0, < 2.20.6","status":"affected"}],"vendor":"sveltejs","product":"kit","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.20.6"}],"ecosystem":"npm","package":"@sveltejs/kit","purl":"pkg:npm/%40sveltejs/kit","source":"ghsa"}],"references":[{"url":"https://github.com/sveltejs/kit/security/advisories/GHSA-6q87-84jw-cjhp","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sveltejs/kit/commit/d3300c6a67908590266c363dba7b0835d9a194cf","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sveltejs/kit/releases/tag/%40sveltejs%2Fkit%402.20.6","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-32388","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/sveltejs/kit","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-04-16T13:33:24.850Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-32388","url":"https://www.cve.org/CVERecord?id=CVE-2025-32388","licence":"CVE Terms of Use","modified":"2025-04-16T13:33:47.383Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6q87-84jw-cjhp","url":"https://github.com/advisories/GHSA-6q87-84jw-cjhp","licence":"CC-BY-4.0","modified":"2025-04-16T00:40:49.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-32388","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-32388","licence":"Public domain","modified":"2026-06-17T09:11:55.317Z"}],"updatedAt":"2026-11-25T22:58:56.532Z","epss":{"score":0.0031,"percentile":0.25717,"date":"2026-12-01T12:00:22.000Z"}}