{"id":"CVE-2026-114061","kind":"vulnerability","aliases":["CVE-2026-114061","GHSA-27mw-82g8-phjj"],"related":[],"title":"SvelteKit : XSS via untrusted cache-control header in prerendered page","description":"### Impact\n\nApplications that prerender pages and use `setHeaders` to set a `cache-control` header from an untrusted source are vulnerable to cross-site scripting (XSS).\n\nSvelteKit inserts the header value into a `<meta http-equiv=\"cache-control\">` tag without escaping it. An attacker who can influence this value at prerender time can break out of the `content` attribute and inject HTML or JavaScript into the generated page. The injected code can then execute when users visit the page.\n\n### Patches\n\nThe fix escapes the header value before inserting it into the generated HTML. Upgrade to `@sveltejs/kit` version 3.0.0 or later.\n\n### Workarounds\n\nAvoid forwarding untrusted `cache-control` header values with `setHeaders` on prerendered pages. Use a fixed, trusted cache policy instead.","summary":"SvelteKit prerendered pages put a cache-control header value into a meta tag without escaping it when the app sets that header from untrusted input via setHeaders. An attacker who controls that value at prerender time can inject HTML or JavaScript that runs for visitors of the generated page.","severity":"medium","cvss":4.7,"epss":0.00174,"exploited":false,"exploited_at":null,"products":[{"name":"@sveltejs/kit","fixed":["3.0.0"],"affected":"< 3.0.0","ecosystem":"npm"}],"ecosystems":["npm"],"tags":["cwe-79","next.js","npm","package","prerendered-sites","sveltekit"],"not_affected_if":["no-setheaders-usage","static-export-with-fixed-headers","untrusted-input-not-used"],"how_to_check":"Search the app for setHeaders calls that set cache-control from request data, query params, or other untrusted sources on pages that are prerendered.","fix":"Upgrade @sveltejs/kit to 3.0.0 or later.\nUntil then, stop forwarding untrusted cache-control values with setHeaders on prerendered pages and use a fixed cache policy.","status":"open","published_at":"2026-10-21T01:17:29+00:00","first_seen_at":"2026-10-23T20:45:22+00:00","triaged_at":"2026-10-23T20:46:26+00:00","updated_at":"2026-10-23T21:57:27+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-23T20:46:26Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade @sveltejs/kit to 3.0.0 or later.\nUntil then, stop forwarding untrusted cache-control values with setHeaders on prerendered pages and use a fixed cache policy.","reach":"internet","summary":"SvelteKit prerendered pages put a cache-control header value into a meta tag without escaping it when the app sets that header from untrusted input via setHeaders. An attacker who controls that value at prerender time can inject HTML or JavaScript that runs for visitors of the generated page.","category":"package","who_cares":["sveltekit","next.js","npm","prerendered-sites"],"confidence":0.7,"needs_auth":"unknown","worst_case":"Attacker-injected JavaScript runs in visitors' browsers on the generated page.","analyst_note":"","how_to_check":"Search the app for setHeaders calls that set cache-control from request data, query params, or other untrusted sources on pages that are prerendered.\nunknown","needs_analyst":false,"not_affected_if":["static-export-with-fixed-headers","no-setheaders-usage","untrusted-input-not-used"],"user_interaction":"yes","needs_special_setup":"yes","severity_if_unknown":"low"},"cost_usd":0.000481,"input_tokens":2697,"output_tokens":423,"severity_before":"low"},"analyst_status":null,"analyst_note":null,"search":"'-114061':14A,22A '-2026':13A,21A '-79':25B '27mw':17A '3.0.0':176C '82g8':18A 'app':52B 'applic':84C 'attack':62B,122C 'attribut':137C 'avoid':180C 'break':132C 'cach':6A,39B,95C,184C,197C 'cache-control':5A,38B,94C,183C 'code':149C 'content':136C 'control':7A,40B,64B,96C,185C 'cross':106C 'cross-sit':105C 'cve':12A,20A 'cwe':24B 'escap':48B,119C,161C 'execut':152C 'fix':160C,195C 'forward':181C 'generat':81B,145C,170C 'ghsa':16A 'ghsa-27mw-82g8-phjj':15A 'header':8A,41B,55B,97C,113C,163C,186C 'html':72B,140C,171C 'impact':83C 'influenc':125C 'inject':71B,139C,148C 'input':58B 'insert':111C,166C 'instead':199C 'javascript':74B,142C 'later':178C 'meta':45B 'next.js':26B 'npm':27B 'packag':28B 'page':11A,35B,82B,87C,146C,157C,192C 'patch':158C 'phjj':19A 'polici':198C 'prerend':10A,30B,34B,68B,86C,129C,191C 'prerendered-sit':29B 'put':36B 'run':76B 'script':108C 'set':53B,92C 'sethead':60B,90C,189C 'site':31B,107C 'sourc':101C 'sveltejs/kit':23A,174C 'sveltekit':1A,32B,33B,110C 'tag':46B,117C 'time':69B,130C 'trust':196C 'untrust':4A,57B,100C,182C 'upgrad':172C 'use':89C,193C 'user':154C 'valu':42B,66B,114C,127C,164C,187C 'version':175C 'via':3A,59B 'visit':155C 'visitor':78B 'vulner':103C 'without':47B,118C 'workaround':179C 'xss':2A,109C","nicknames":[],"mitigations":[],"who_affected":null,"tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-21T01:17:29+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:N","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-27mw-82g8-phjj","url":"https://github.com/advisories/GHSA-27mw-82g8-phjj","severity":"low","published_at":"2026-10-23T20:43:30+00:00","modified_at":"2026-10-23T20:43:31+00:00","first_seen_at":"2026-10-23T20:45:22+00:00","fetched_at":"2026-10-23T20:45:22+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-114061","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114061","severity":null,"published_at":"2026-10-21T01:17:29+00:00","modified_at":"2026-10-22T17:34:37+00:00","first_seen_at":"2026-10-23T21:57:27+00:00","fetched_at":"2026-10-23T22:29:01+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}