CVE-2026-27125: Svelte SSR attribute spreading prototype chain pollution

CVE-2026-27125 · Severity: medium · CVSS 4 · Published 2026-02-19

Svelte is a popular web framework for building user interfaces. During server-side rendering, the framework can inadvertently include inherited properties from JavaScript's prototype chain when spreading attributes on HTML elements. If the prototype chain has been polluted (typically by a third-party library), this can cause unexpected HTML attributes to appear in the rendered output or cause the server to throw errors, affecting page rendering and availability.

Technologies: svelte (npm). Vendors: npm.

Quick answers

Is CVE-2026-27125 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-27125 being exploited in the wild.
How severe is CVE-2026-27125?
Medium severity, with a CVSS score of 4, published 19 February 2026.
Which products and versions are affected?
svelte (npm) SEMVER:introduced=0,fixed=5.51.5.
Is there a fix for CVE-2026-27125?
Yes. svelte (npm): upgrade to 5.51.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-27125 attacked?
It is attacked over the network.
Am I affected by CVE-2026-27125?
Check whether you run svelte (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • svelte (npm): upgrade to 5.51.5 or later
    npm install svelte@5.51.5

Technical details

The vulnerability exists in Svelte's server-side rendering (SSR) implementation for attribute spreading (e.g., <div {...attrs}>). When spreading object properties, the code enumerates inherited properties from the prototype chain instead of using only own properties. This is a prototype pollution exposure: in environments where Object.prototype has been polluted by another library or code, the inherited polluted properties are included in the SSR output. The attack requires a precondition (Object.prototype pollution) and affects only SSR; client-side rendering is unaffected. The vulnerability was fixed in Svelte 5.51.5 (commit 73098bb).

Affected products

  • Svelte Svelte <=5.51.4

Identifiers

  • CVE-2026-27125
  • GHSA-crpf-4hrx-3jrp

Timeline

  • 2026-02-19: disclosed
  • 2026-02-19: patched: Fixed in version 5.51.5

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.