{"id":"GHSA-mh2x-fcqh-fmqv","summary":"@sveltejs/kit has unescaped error message included on error page","details":"### Summary\n\nThe static error.html template for errors contains placeholders that are replaced without escaping the content first.\n\n### Details\n\nFrom https://kit.svelte.dev/docs/errors:\n\n\u003e error.html is the page that is rendered when everything else fails. It can contain the following placeholders:\n%sveltekit.status% — the HTTP status\n%sveltekit.error.message% — the error message\n\nThis leads to possible injection if an app explicitly creates an error with a message that contains user controlled content that ends up being something like this inside a server handle function: \n```js\nerror(500, '\u003cscript\u003ealert(\"boom\")\u003c/script\u003e');\n```\nUncaught errors cannot be exploited like this, as they always render the message \"Internal error\".\n\nEscaping the message string in the function that creates the html output can be done to improve safety for applications that are using custom errors on the server.\n\n### PoC\n\nNone provided\n\n### Impact\n\nOnly applications where user provided input is used in the `Error` message will be vulnerable, so the vast majority of applications will not be vulnerable","aliases":["CVE-2024-53262"],"modified":"2024-11-25T21:46:57Z","published":"2024-11-25T15:32:45Z","database_specific":{"cwe_ids":["CWE-79"],"github_reviewed_at":"2024-11-25T15:32:45Z","github_reviewed":true,"nvd_published_at":"2024-11-25T20:15:10Z","severity":"LOW"},"references":[{"type":"WEB","url":"https://github.com/sveltejs/kit/security/advisories/GHSA-mh2x-fcqh-fmqv"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-53262"},{"type":"WEB","url":"https://github.com/sveltejs/kit/pull/13050"},{"type":"WEB","url":"https://github.com/sveltejs/kit/commit/134e36343ef57ed7e6e2b3bb9e7f05ad37865794"},{"type":"PACKAGE","url":"https://github.com/sveltejs/kit"},{"type":"WEB","url":"https://github.com/sveltejs/kit/releases/tag/%40sveltejs%2Fkit%402.8.3"},{"type":"WEB","url":"https://kit.svelte.dev/docs/errors"}],"affected":[{"package":{"name":"@sveltejs/kit","ecosystem":"npm","purl":"pkg:npm/%40sveltejs/kit"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.8.3"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/11/GHSA-mh2x-fcqh-fmqv/GHSA-mh2x-fcqh-fmqv.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N"},{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:P"}]}