The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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-27125

CVE-2026-27125: Svelte SSR Prototype Pollution Vulnerability

CVE-2026-27125 is a prototype pollution flaw in Svelte's server-side rendering that causes unexpected attributes in SSR output. This post explains its impact, affected versions, and mitigation steps.

Published: February 27, 2026

CVE-2026-27125 Overview

CVE-2026-27125 is an Improperly Controlled Modification of Dynamically-Determined Object Attributes (CWE-915) vulnerability in Svelte, a performance-oriented web framework. Prior to version 5.51.5, Svelte's server-side rendering (SSR) implementation improperly handles attribute spreading on elements (e.g., <div {...attrs}>), enumerating inherited properties from the object's prototype chain rather than only own properties. In environments where Object.prototype has already been polluted—a precondition outside of Svelte's control—this can cause unexpected attributes to appear in SSR output or cause SSR to throw errors.

Critical Impact

When combined with prototype pollution, attackers may inject unexpected HTML attributes into SSR output, potentially enabling cross-site scripting (XSS) or disrupting application rendering. Client-side rendering is not affected.

Affected Products

  • Svelte versions prior to 5.51.5 (Node.js)
  • Applications using Svelte SSR with attribute spreading syntax
  • Server-side rendered applications in environments with polluted Object.prototype

Discovery Timeline

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

Technical Details for CVE-2026-27125

Vulnerability Analysis

This vulnerability stems from how Svelte's SSR compiler handles attribute spreading on HTML elements. When developers use the spread syntax (e.g., <div {...attrs}>), Svelte enumerates all properties of the object, including those inherited from the prototype chain. In a clean JavaScript environment, this behavior is benign since Object.prototype contains no enumerable properties by default.

However, if an attacker or a vulnerable dependency has polluted Object.prototype with malicious properties, those properties will be rendered as HTML attributes during SSR. This creates a second-order vulnerability where prototype pollution—typically considered a precondition vulnerability—can escalate to attribute injection in SSR output.

The attack requires network access and assumes that prototype pollution has already occurred in the server environment, making exploitation dependent on chaining with another vulnerability.

Root Cause

The root cause lies in the SSR attribute spreading implementation not filtering for own properties. When iterating over an object's properties during attribute rendering, the code enumerated all properties including inherited ones. The fix introduces proper validation using REGEX_VALID_TAG_NAME and adds explicit error handling for invalid dynamic element tags, preventing malicious attributes from prototype pollution from being rendered.

Attack Vector

The attack requires an attacker to first achieve prototype pollution in the Node.js server environment through a separate vulnerability. Once Object.prototype is polluted with enumerable properties, any Svelte component using attribute spreading will include those properties in the rendered HTML output. This network-accessible attack path could enable:

  1. Injection of arbitrary HTML attributes into SSR output
  2. Potential XSS if event handler attributes (e.g., onclick) are injected
  3. SSR crashes due to invalid attribute values causing rendering errors
javascript
// Security patch in packages/svelte/src/compiler/phases/1-parse/state/element.js
 /** @import { Location } from 'locate-character' */
 /** @import { AST } from '#compiler' */
 /** @import { Parser } from '../index.js' */
-import { is_void } from '../../../../utils.js';
+import { is_void, REGEX_VALID_TAG_NAME } from '../../../../utils.js';
 import read_expression from '../read/expression.js';
 import { read_script } from '../read/script.js';
 import read_style from '../read/style.js';

Source: GitHub Commit

javascript
// Security patch in packages/svelte/src/internal/server/errors.js - Added validation
 	throw error;
 }
 
+/**
+ * `<svelte:element this="%tag%">` is not a valid element name — the element will not be rendered
+ * @param {string} tag
+ * @returns {never}
+ */
+export function dynamic_element_invalid_tag(tag) {
+	const error = new Error(`dynamic_element_invalid_tag\n\`<svelte:element this="${tag}">\` is not a valid element name — the element will not be rendered\nhttps://svelte.dev/e/dynamic_element_invalid_tag`);
+
+	error.name = 'Svelte error';
+
+	throw error;
+}
+
 /**
  * Encountered asynchronous work while rendering synchronously.
  * @returns {never}

Source: GitHub Commit

Detection Methods for CVE-2026-27125

Indicators of Compromise

  • Unexpected HTML attributes appearing in server-rendered pages that are not defined in component code
  • SSR rendering errors with messages about invalid attribute names or values
  • Prototype pollution indicators such as unexpected properties on native JavaScript objects
  • Application logs showing dynamic_element_invalid_tag errors after patching

Detection Strategies

  • Audit Svelte application dependencies for prototype pollution vulnerabilities using npm audit or similar tools
  • Review SSR output for anomalous HTML attributes not defined in source templates
  • Implement runtime monitoring for Object.prototype modifications in the Node.js server environment
  • Use static analysis tools to identify components using attribute spreading syntax

Monitoring Recommendations

  • Enable detailed SSR error logging to capture rendering anomalies
  • Monitor for unusual patterns in rendered HTML output using output validation
  • Implement Content Security Policy (CSP) headers to mitigate potential XSS from attribute injection
  • Set up alerts for prototype pollution detection libraries in the server runtime

How to Mitigate CVE-2026-27125

Immediate Actions Required

  • Upgrade Svelte to version 5.51.5 or later immediately
  • Audit the application environment for existing prototype pollution vulnerabilities
  • Review dependencies for known prototype pollution issues and update accordingly
  • Consider implementing Object.freeze on Object.prototype in server environments if feasible

Patch Information

The vulnerability is fixed in Svelte version 5.51.5. The patch introduces proper tag name validation using REGEX_VALID_TAG_NAME and adds explicit error handling for invalid dynamic element tags. The fix ensures that only valid, explicitly defined properties are rendered as HTML attributes during SSR.

  • GitHub Security Advisory GHSA-crpf-4hrx-3jrp
  • GitHub Release v5.51.5
  • Security Patch Commit

Workarounds

  • Avoid using attribute spreading syntax ({...attrs}) in SSR-rendered components until patched
  • Explicitly enumerate required attributes instead of spreading entire objects
  • Implement server-side input validation to sanitize objects before attribute spreading
  • Use Object.keys() or Object.getOwnPropertyNames() patterns when manually handling object properties
bash
# Upgrade Svelte to the patched version
npm update svelte@5.51.5

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

# Verify the 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
  • TypeOther

  • Vendor/TechSvelte

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:L/VI:L/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-915
  • Technical References
  • GitHub Release Note v5.51.5
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-crpf-4hrx-3jrp
  • 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