CVE-2026-114061
JSON

2.3low

SvelteKit before 3.0.0 XSS via Cache-Control Header in Prerendered Pages

Severity
2.3low CVSS:4.0 by VulnCheck
Exploit likelihood
0.21% (higher than 12% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck
Also known as
GHSA-27mw-82g8-phjj

Description

SvelteKit (@sveltejs/kit) before 3.0.0 contains a cross-site scripting vulnerability in prerendered pages because a cache-control header value set via setHeaders is inserted without escaping into a <meta http-equiv="cache-control"> tag. An attacker who can influence that untrusted value at prerender time can break out of the content attribute and inject HTML or JavaScript that executes when users visit the page.

Affected

Product or packageVersionsReported by
sveltejs kitbefore 3.0.0
Not affected: 3.0.0
CVE List
@sveltejs/kit (npm)before 3.0.0GitHub Advisory Database

All scores

VulnCheck2.3low CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
VulnCheck4.7medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHub0.0low CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:N

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

SvelteKit (@sveltejs/kit) before 3.0.0 contains a cross-site scripting vulnerability in prerendered pages because a cache-control header value set via setHeaders is inserted without escaping into a <meta http-equiv="cache-control"> tag. An attacker who can influence that untrusted value at prerender time can break out of the content attribute and inject HTML or JavaScript that executes when users visit the page.

GitHub Advisory Database
Impact

Applications that prerender pages and use setHeaders to set a cache-control header from an untrusted source are vulnerable to cross-site scripting (XSS).

SvelteKit 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.

Patches

The fix escapes the header value before inserting it into the generated HTML. Upgrade to @sveltejs/kit version 3.0.0 or later.

Workarounds

Avoid forwarding untrusted cache-control header values with setHeaders on prerendered pages. Use a fixed, trusted cache policy instead.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-114061 changed 2026-10-28CVE Terms of Use
GitHub Advisory DatabaseGHSA-27mw-82g8-phjj changed 2026-10-23CC-BY-4.0
NVDCVE-2026-114061 changed 2026-10-28Public domain