CVE-2026-27902
Description
A cross-site scripting (XSS) vulnerability was found in Svelte’s server-side rendering (SSR) error handling. Error messages returned from the transformError function were not properly escaped before being embedded into HTML output within hydration markers. If an application returns attacker-controlled content through transformError, the content may be interpreted as HTML in the rendered page, resulting in HTML injection and potential execution of arbitrary JavaScript in a victim’s browser. Successful exploitation could allow an attacker to access sensitive information or perform actions in the context of the affected user.
Statement
This MODERATE severity cross-site scripting (XSS) flaw in Svelte's server-side rendering (SSR) error handling allows for HTML injection. If an application utilizing Svelte's SSR returns attacker-controlled content through the transformError function, it could lead to the execution of arbitrary JavaScript in a victim's browser. This only affects applications or packages that embed or utilize Svelte in a server-side rendering context.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 4.2 | 5.4 | N/A |
| Attack Vector | Network | Network | N/A |
| Attack Complexity | High | Low | N/A |
| Privileges Required | None | None | N/A |
| User Interaction | Required | Required | N/A |
| Scope | Unchanged | Unchanged | N/A |
| Confidentiality | Low | Low | N/A |
| Integrity Impact | Low | Low | N/A |
| Availability Impact | None | None | N/A |
Vector
Red Hat: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
NVD: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.