CVE-2026-27125: 
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-27125 is a vulnerability in the Svelte JavaScript framework's server-side rendering (SSR) engine, where attribute spreading on elements (e.g., <div {...attrs}>) enumerates inherited properties from the object's prototype chain rather than only own properties. This behavior, classified as CWE-915 (Improperly Controlled Modification of Dynamically-Determined Object Attributes), can be exploited in environments where Object.prototype has already been polluted — a precondition outside of Svelte's control — causing unexpected attributes to appear in SSR output or causing SSR to throw errors. Client-side rendering is not affected. All Svelte npm package versions up to and including 5.51.4 are affected; the fix was released in version 5.51.5. The vulnerability carries a CVSS v3.1 base score of 6.8 (Medium/High) and a CVSS v4.0 base score of 5.3 (Medium) (GitHub Advisory, Svelte Security Advisory).

Technical details

The root cause is classified as CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes. During SSR, Svelte's attribute spreading logic iterates over all enumerable properties of a spread object — including those inherited from the prototype chain — rather than restricting iteration to own properties (e.g., using Object.keys() or hasOwnProperty checks). The fix in commit 73098bb replaced for...in loops with for...of Object.keys(...) to ensure only own properties are enumerated, and also added validation of <svelte:element> tag names against a strict regex (REGEX_VALID_TAG_NAME) to prevent injection of invalid or malicious tag names during SSR (Svelte Commit, GitHub Advisory). Exploitation requires a precondition of prototype pollution already being present in the Node.js environment, which is outside Svelte's control but may result from other vulnerabilities or dependencies in the application stack (Svelte Security Advisory).

Impact

If Object.prototype has been polluted in the server-side Node.js environment, this vulnerability can cause Svelte SSR to inject unexpected HTML attributes into rendered output, potentially enabling attribute injection or cross-site scripting (XSS) in the HTML delivered to end users. The subsequent system impact is rated High for both confidentiality and integrity, meaning downstream users receiving the tampered SSR output could be exposed to data theft or content manipulation. Availability is not directly impacted, though SSR may throw errors that disrupt rendering. Client-side (browser) rendering is entirely unaffected (GitHub Advisory, Red Hat Bugzilla).

Exploitability

No public proof-of-concept exploit code or in-the-wild exploitation has been reported for CVE-2026-27125. The EPSS score is approximately 0.05% (9th percentile), indicating a low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires a low-privileged attacker and high attack complexity, as it depends on the precondition of prototype pollution already being present in the target environment — a condition that must be established through a separate vulnerability or misconfiguration (GitHub Advisory, Feedly).

Exploitation steps

  1. Establish prototype pollution precondition: Exploit a separate prototype pollution vulnerability in the target Node.js application (e.g., via a vulnerable dependency that allows __proto__ or constructor.prototype manipulation) to inject malicious properties into Object.prototype, such as Object.prototype.onload = 'alert(1)'.
  2. Target a Svelte SSR endpoint: Identify a server-side rendered Svelte application (version ≤ 5.51.4) that uses attribute spreading syntax (e.g., <div {...attrs}>) in its component templates.
  3. Trigger SSR rendering: Send an HTTP request to the application that causes the vulnerable Svelte SSR code path to render a component with attribute spreading, causing the polluted prototype properties to be enumerated and included as HTML attributes in the server response.
  4. Observe injected attributes: The SSR output will contain unexpected HTML attributes derived from the polluted prototype (e.g., <div onload="alert(1)">), which may be delivered to end users and trigger XSS or other client-side attacks.
  5. Alternatively, cause SSR errors: Inject prototype properties that cause type errors or exceptions during Svelte's SSR attribute enumeration, potentially disrupting the application's rendering pipeline (GitHub Advisory, Svelte Commit).

Indicators of compromise

  • Logs: Unexpected SSR errors or stack traces in Node.js server logs referencing Svelte's internal rendering functions; error messages containing dynamic_element_invalid_tag on patched versions when invalid tag names are passed.
  • Network: HTTP responses from the Svelte SSR server containing unexpected or anomalous HTML attributes on rendered elements (e.g., event handler attributes like onload, onerror appearing on non-interactive elements).
  • Application Behavior: Svelte SSR throwing unexpected errors during rendering of components that use attribute spreading ({...attrs}), particularly if no code changes have been made to those components.
  • Prototype Pollution Indicators: Evidence of prototype pollution in the Node.js process, such as Object.prototype containing unexpected enumerable properties; this may be detectable via application monitoring or runtime integrity checks (GitHub Advisory, Svelte Commit).

Mitigation and workarounds

The primary remediation is to upgrade the Svelte npm package to version 5.51.5 or later, which was released on February 18, 2026, and restricts attribute spreading to own properties only using Object.keys() (Svelte Release, GitHub Advisory). As a defense-in-depth measure, applications should also audit and remediate any prototype pollution vulnerabilities in their dependency chain, since this CVE's exploitability depends on Object.prototype being polluted as a precondition. There is no known configuration-based workaround that fully mitigates the issue without upgrading Svelte.

Community reactions

The vulnerability was discovered and reported by the GitHub user elliott-with-the-longest-name-on-github and was addressed promptly by the Svelte maintainers with a patch released the same day as the advisory (February 18, 2026). Red Hat tracked the issue via Bugzilla (Bug 2441511) and assessed it as medium severity. No significant broader media coverage or notable community controversy has been identified beyond standard vulnerability tracking (GitHub Advisory, Red Hat Bugzilla).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

RHEL / CentOS

Unknown

Source: This report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-966w-4vpf-p7hcHIGH7.1
  • JavaScript logoJavaScript
  • @aloma.io/aloma
NoYesOct 25, 2026
GHSA-mrwp-f3q8-3g9pMEDIUM5.9
  • JavaScript logoJavaScript
  • follow-redirects
NoYesOct 25, 2026
GHSA-hfm3-x63j-7fxpHIGHN/A
  • JavaScript logoJavaScript
  • @payload-auth-link/migrate
NoYesOct 25, 2026
GHSA-6244-vvv9-76f5MEDIUMN/A
  • JavaScript logoJavaScript
  • @payload-auth-link/plugin
NoYesOct 25, 2026
GHSA-q53q-qg98-p9jfHIGHN/A
  • JavaScript logoJavaScript
  • llm-fw
NoYesOct 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management