Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-27902: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in sveltejs svelte

0
Medium
VulnerabilityCVE-2026-27902cvecve-2026-27902cwe-79
Published: Thu Feb 26 2026 (02/26/2026, 00:58:54 UTC)
Source: CVE Database V5
Vendor/Project: sveltejs
Product: svelte

Description

Svelte performance oriented web framework. Prior to version 5.53.5, errors from `transformError` were not correctly escaped prior to being embedded in the HTML output, causing potential HTML injection and XSS if attacker-controlled content is returned from `transformError`. Version 5.53.5 fixes the issue.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/05/2026, 10:14:10 UTC

Technical Analysis

CVE-2026-27902 is a cross-site scripting (XSS) vulnerability classified under CWE-79 affecting the Svelte JavaScript framework, specifically versions from 5.53.0 up to but not including 5.53.5. The root cause is improper neutralization of input during web page generation: errors returned by the transformError function were embedded directly into the HTML output without proper escaping or sanitization. If an attacker can influence the content returned by transformError, they can inject malicious HTML or JavaScript code into the rendered page. This can lead to execution of arbitrary scripts in the context of the victim's browser, potentially compromising user sessions, stealing sensitive data, or performing actions on behalf of the user. The vulnerability requires that the attacker can cause transformError to return attacker-controlled content, which may require some level of interaction or partial control over input to the application. The CVSS 4.0 base score is 5.3 (medium severity), reflecting network attack vector, high attack complexity, partial user interaction, and limited impact on confidentiality and integrity. The scope is high because the vulnerability affects the Svelte framework itself, which is widely used for building reactive web applications. The issue was addressed in Svelte version 5.53.5 by properly escaping error content before embedding it into HTML output, preventing injection of malicious code. No known exploits have been reported in the wild as of the publication date. This vulnerability highlights the importance of secure error handling and output encoding in web frameworks to prevent XSS attacks.

Potential Impact

The primary impact of CVE-2026-27902 is the potential for cross-site scripting attacks in web applications built using vulnerable versions of the Svelte framework. Successful exploitation can lead to execution of arbitrary JavaScript in users' browsers, enabling attackers to steal session cookies, perform actions on behalf of users, deface websites, or redirect users to malicious sites. This can compromise user privacy and trust, damage brand reputation, and potentially lead to further exploitation such as account takeover or data exfiltration. Since Svelte is a popular framework for building modern web applications, a wide range of organizations including startups, enterprises, and service providers could be affected if they use vulnerable versions without patching. The attack requires some user interaction and partial control over error content, which may limit exploitation but does not eliminate risk. The vulnerability does not directly affect server confidentiality or availability but can indirectly lead to broader security incidents through client-side compromise. Organizations relying on Svelte for frontend development should consider this vulnerability a significant risk to their web application security posture.

Mitigation Recommendations

1. Upgrade all Svelte framework instances to version 5.53.5 or later, which contains the fix for this vulnerability. 2. Review and sanitize any custom error handling code that interacts with transformError or similar functions to ensure no untrusted input is embedded into HTML without proper escaping. 3. Implement Content Security Policy (CSP) headers to restrict the execution of unauthorized scripts and mitigate the impact of potential XSS attacks. 4. Conduct thorough security testing, including automated and manual penetration testing focused on error handling and output encoding in web applications using Svelte. 5. Educate developers on secure coding practices related to output encoding and error message handling to prevent similar vulnerabilities. 6. Monitor application logs and user reports for suspicious activity that may indicate attempted exploitation. 7. If immediate upgrade is not feasible, consider temporary mitigations such as sanitizing error messages at the application layer before rendering. 8. Keep dependencies and third-party libraries up to date and subscribe to security advisories related to Svelte and associated tooling.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-02-24T15:19:29.718Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 699fa148b7ef31ef0b7796ae

Added to database: 2/26/2026, 1:26:32 AM

Last enriched: 3/5/2026, 10:14:10 AM

Last updated: 4/12/2026, 1:39:19 AM

Views: 63

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses