Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-27122

CVE-2026-27122: Svelte Framework XSS Vulnerability

CVE-2026-27122 is an XSS vulnerability in Svelte framework affecting server-side rendering when using svelte:element tags. Attackers can inject malicious HTML through unsanitized tag names. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: February 27, 2026

CVE-2026-27122 Overview

CVE-2026-27122 is a Cross-Site Scripting (XSS) vulnerability in the Svelte performance-oriented web framework affecting server-side rendering (SSR) functionality. Prior to version 5.51.5, when using <svelte:element this={tag}> in server-side rendering, the provided tag name is not validated or sanitized before being emitted into the HTML output. If the tag string contains unexpected characters, it can result in HTML injection in the SSR output. Client-side rendering is not affected by this vulnerability.

Critical Impact

Attackers who can control the tag parameter in SSR contexts may inject arbitrary HTML content, potentially leading to cross-site scripting attacks against users viewing server-rendered pages.

Affected Products

  • Svelte versions prior to 5.51.5
  • Svelte SSR implementations using dynamic <svelte:element> components
  • Node.js applications utilizing Svelte for server-side rendering

Discovery Timeline

  • 2026-02-20 - CVE-2026-27122 published to NVD
  • 2026-02-23 - Last updated in NVD database

Technical Details for CVE-2026-27122

Vulnerability Analysis

This vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation), commonly known as Cross-Site Scripting. The issue resides in Svelte's server-side rendering pipeline where dynamic element tag names are processed without proper sanitization.

The <svelte:element> component allows developers to dynamically specify HTML element types at runtime. In SSR contexts, when the this attribute receives a tag name containing malicious characters or HTML sequences, Svelte directly interpolates this value into the rendered HTML output without escaping or validation.

This creates an injection point where attacker-controlled input can break out of the expected element context and inject arbitrary HTML or script content into the server-rendered response. The vulnerability specifically impacts applications that derive the element tag from user input, database values, or other untrusted sources during server-side rendering.

Root Cause

The root cause is missing input validation and output encoding in Svelte's SSR template compiler. When processing dynamic element tags via <svelte:element this={tag}>, the framework assumes the tag parameter contains only valid HTML element names. The SSR rendering path does not enforce restrictions on allowable characters or sanitize special characters that could alter the HTML structure.

This differs from client-side rendering where the DOM API naturally constrains element creation, making the same attack vector ineffective in browser contexts.

Attack Vector

The attack vector is network-based and requires an attacker to influence the value passed to the this attribute of a <svelte:element> component during server-side rendering. Exploitation scenarios include:

The vulnerability is exploited when a malicious tag value containing HTML special characters (such as >, <, quotes, or complete HTML sequences) is passed to a <svelte:element> component. During SSR, this unsanitized value is emitted directly into the HTML response, allowing the attacker to inject arbitrary HTML content or JavaScript code.

For example, if an application renders <svelte:element this={userInput}> where userInput contains a crafted string with closing brackets and script tags, the resulting HTML output would include the injected content, which executes when the page is served to users.

For technical details and proof-of-concept information, see the GitHub Security Advisory.

Detection Methods for CVE-2026-27122

Indicators of Compromise

  • Unusual HTML structures or unexpected script tags appearing in server-rendered page responses
  • Error logs showing malformed HTML element names being processed during SSR
  • User reports of unexpected behavior or content on pages using dynamic <svelte:element> components
  • Web application firewall alerts for HTML/XSS patterns in request parameters that map to element tags

Detection Strategies

  • Audit codebase for usage of <svelte:element this={...}> patterns where the tag source originates from untrusted input
  • Review server-side rendering logs for element names containing non-alphanumeric characters
  • Implement Content Security Policy (CSP) headers to detect and report inline script execution attempts
  • Deploy web application firewall rules to identify HTML injection patterns in request payloads

Monitoring Recommendations

  • Enable detailed SSR logging to capture dynamic element tag values for anomaly detection
  • Monitor for CSP violation reports indicating potential XSS exploitation attempts
  • Implement server-side input validation logging for parameters used in dynamic element rendering
  • Track Svelte framework version across deployed applications to identify unpatched instances

How to Mitigate CVE-2026-27122

Immediate Actions Required

  • Upgrade Svelte to version 5.51.5 or later immediately
  • Audit all instances of <svelte:element this={...}> in SSR-enabled components for untrusted input sources
  • Implement allowlist validation for dynamic tag names until patching is complete
  • Consider temporarily disabling SSR for components using dynamic elements with user-controlled input

Patch Information

The vulnerability is fixed in Svelte version 5.51.5. Organizations should update their package.json dependencies and redeploy affected applications. The fix implements proper validation and sanitization of tag names before emitting them into SSR HTML output.

For complete details on the security fix, refer to the GitHub Security Advisory GHSA-m56q-vw4c-c2cp.

Workarounds

  • Implement application-level allowlist validation for all dynamic tag names before passing them to <svelte:element>
  • Restrict dynamic element sources to trusted, hardcoded values rather than user-supplied input
  • Deploy Content Security Policy headers with strict script-src directives to mitigate XSS impact
  • Consider using static element types where possible instead of dynamic <svelte:element> components
bash
# Update Svelte to patched version
npm update svelte@5.51.5

# Or specify exact version in package.json
npm install svelte@5.51.5 --save-exact

# Verify installed version
npm list svelte

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechSvelte

  • SeverityMEDIUM

  • CVSS Score5.1

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:N/VC:L/VI:N/VA:N/SC:H/SI:H/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-27902: Svelte Framework XSS Vulnerability

  • CVE-2026-27901: Svelte Framework XSS Vulnerability

  • CVE-2026-27119: Svelte Framework XSS Vulnerability

  • CVE-2026-27121: Svelte Framework XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English