Svelte Server-Side Rendering Attribute Spreading Vulnerability

Vulnerability

A vulnerability in Svelte's server-side rendering (SSR) feature allows attribute spreading on elements to include inherited properties from the object's prototype chain, rather than just its own properties. This issue arises in environments where Object.prototype has been modified, leading to unexpected attributes in the SSR output or causing errors. Client-side rendering is not impacted.

Impact

Exploitation of this vulnerability can result in the incorrect rendering of attributes during server-side processing, potentially allowing for markup injection or other unintended consequences.

Reproduction

To reproduce this vulnerability, use a version of Svelte prior to 5.51.5 and create a component that spreads attributes onto an element using the 'svelte:element' tag. In an environment where 'Object.prototype' has been polluted, this will cause inherited properties to be included, leading to unexpected attributes in the server-side rendered output or causing an error.

Remediation

Users can upgrade to Svelte version 5.51.5 or later, where this vulnerability has been fixed.

Added: Feb 20, 2026, 11:26 PM
Updated: Feb 20, 2026, 11:26 PM

Vulnerability Rating

Custom Algorithm
spread
4.2
impact
1.3
exploitability
5.1
remediation
7.7
relevance
3.1
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.