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

Source: https://junglewise.ai/threats/cve-2026-27125-svelte-ssr-attribute-spreading-prototype-chain-pollution  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-02-19. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/svelte). Vendors: [npm](https://junglewise.ai/threats/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

  ```sh
  npm install svelte@5.51.5
  ```


## Technical details

The vulnerability exists in Svelte's server-side rendering (SSR) implementation for attribute spreading (e.g., &lt;div {...attrs}&gt;). 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

- [https://github.com/sveltejs/svelte/security/advisories/GHSA-crpf-4hrx-3jrp](https://github.com/sveltejs/svelte/security/advisories/GHSA-crpf-4hrx-3jrp)

## Related threats

- [Svelte XSS via spread attributes in SSR](https://junglewise.ai/threats/cve-2026-42599-svelte-xss-via-spread-attributes-in-ssr)
- [Svelte DOM clobbering leading to XSS in internal framework state](https://junglewise.ai/threats/cve-2026-42573-svelte-dom-clobbering-leading-to-xss-in-internal-framework-state)
- [Svelte ReDoS in svelte:element tag validation](https://junglewise.ai/threats/cve-2026-42567-svelte-redos-in-svelte-element-tag-validation)
- [Svelte XSS via insecure promise serialization in hydratable](https://junglewise.ai/threats/svelte-xss-via-insecure-promise-serialization-in-hydratable-3f504409)
- [Svelte XSS via HTML comment injection in SSR error boundary](https://junglewise.ai/threats/cve-2026-27902-svelte-xss-via-html-comment-injection-in-ssr-error-boundary)
