CVE-2026-27125: Svelte SSR Attribute Spreading Vulnerability

svelte Updated 23 Feb 2026

Summary

19/02/2026
Yes i
Moderate
5.3

CVE-2026-27125: Svelte SSR attribute spreading includes inherited properties from prototype chain. Affects svelte versions < 5.51.5. Fixed in 5.51.5. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Svelte is a modern JavaScript framework that enables developers to build user interfaces with a focus on performance and simplicity. It compiles components into highly efficient JavaScript at build time, allowing for faster client-side rendering. However, in server-side rendering (SSR), Svelte has a vulnerability related to attribute spreading that can lead to unintended consequences when inherited properties from the prototype chain are included.

Vulnerability Detail

The vulnerability arises during server-side rendering when attribute spreading is performed on elements, such as <div {...attrs}>. This process enumerates inherited properties from the object's prototype chain instead of only considering the object's own properties. In scenarios where Object.prototype has been polluted, this can lead to unexpected attributes appearing in the SSR output or even cause errors during rendering. The issue does not affect client-side rendering, but it poses a risk in server-side environments, particularly when dealing with untrusted input.

How To Fix

Latest published version: 5.57.2 as of 23 Oct 2026

npm install svelte@5.57.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.51.5

This is the first release that contains the fix.

npm install svelte@5.51.5

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can manually filter the attributes before spreading them to ensure that only the object's own properties are included. For example:

const filteredAttrs = Object.keys(attrs).reduce((acc, key) => { if (attrs.hasOwnProperty(key)) { acc[key] = attrs[key];

} return acc; }, {}); <div {...filteredAttrs}>.

Conclusion

The CVE-2026-27125 vulnerability in Svelte poses a risk during server-side rendering due to improper attribute spreading. It is crucial to update to version 5.51.5 or later to mitigate this issue. Implementing the suggested workaround can also help in the interim. Utilizing tools like Vulert can further enhance your application's security posture.

See every vulnerability recorded for svelte →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 5.3, indicating a moderate severity level.

No, this vulnerability only affects server-side rendering in Svelte applications.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

If you cannot update to the patched version, consider implementing the provided workaround to filter attributes before spreading them.

Vulert monitors and alerts in real-time for open-source vulnerabilities using just package-lock.json, helping you maintain the security of your software.

Related vulnerabilities

Recent vulnerabilities recorded for svelte.

How To Fix

Latest published version: 5.57.2 as of 23 Oct 2026

npm install svelte@5.57.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.51.5

This is the first release that contains the fix.

npm install svelte@5.51.5

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback