Skip to content

← Public intelligence

npm package

svelte

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

14 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 5.3npmAmendedPublished

    Svelte: SSR XSS via Insecure Promise Serialization in hydratable

    GHSA-f3cj-j4f6-wq85

    Affected
    • npm svelte >= 5.46.0, <= 5.55.6
    Fixed in
    5.55.7· Vendor fix available
    Issue
    Contents of hydratable promises were not properly stringified, potentially leading to an XSS exploit. You are vulnerable if all of the following is true: - you are using hydratable (an experimental feature at the time of this report) - you are passing attacker-controlled input such that a synchronous value is hydrated, then a promise value, e.g. hydratable('someKey', () = [synchronousValue, promiseValue])

    Recommended action: Upgrade to 5.55.7 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. Medium, CVSS 5.3npmAmendedPublished

    Svelte Vulnerable to XSS via DOM Clobbering of Internal Framework State

    CVE-2026-42573 · GHSA-rcqx-6q8c-2c42

    Affected
    • npm svelte <= 5.55.6
    Fixed in
    5.55.7· Vendor fix available
    Issue
    Svelte was vulnerable to DOM clobbering of its internal framework state on elements, potentially leading to XSS attacks. You are vulnerable if all of the following is true: - you are using attribute spreading on a form element - you are using attribute spreading or allow a dynamic value for the name attribute on an input or button element within that form - both of these are simultaneously user-controllable

    Recommended action: Upgrade to 5.55.7 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. Medium, CVSS 5.9npmAmendedPublished

    Svelte: ReDoS in Tag Validation

    CVE-2026-42567 · GHSA-9rmh-mm8f-r9h6

    Affected
    • npm svelte >= 5.51.5, <= 5.55.6
    Fixed in
    5.55.7· Vendor fix available
    Issue
    An internal regex in the Svelte runtime can take exponential time to test in <svelte:element this={tag}</svelte:element. You are only vulnerable to this if you allow tags of unconstrained length. If your application only allows a predetermined list of tags or trims their length before passing them to svelte:element, you are safe.

    Recommended action: Upgrade to 5.55.7 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  4. Medium, CVSS 5.1npmAmendedPublished

    Svelte SSR vulnerable to cross-site scripting via spread attributes

    CVE-2026-42599 · GHSA-pr6f-5x2q-rwfp

    Affected
    • npm svelte <= 5.55.6
    Fixed in
    5.55.7· Vendor fix available
    Issue
    When using spread syntax to render attributes from untrusted data, event handler properties are included in the rendered HTML output. If an application spreads user-controlled or external data as element attributes, an attacker can inject malicious event handlers that execute in victims' browsers. Note that this vulnerability only triggers if the user's browser has JavaScript enabled but Svelte's hydration mechanism does not reach the vulnerable element before the event fires. This is similar to but different from CVE-2026-27121.

    Recommended action: Upgrade to 5.55.7 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  5. Medium, CVSS 5.3npmAmendedPublished

    Svelte: XSS via HTML Comment Injection in SSR Error Boundary Hydration Markers

    CVE-2026-27902 · GHSA-qgvg-pr8v-6rr3

    Affected
    • npm svelte >= 5.53.0, < 5.53.5
    Fixed in
    5.53.5· Vendor fix available
    Issue
    Errors from transformError were not correctly escaped prior to being embedded in the HTML output, causing potential HTML injection and XSS if attacker-controlled content is returned from transformError.

    Recommended action: Upgrade to 5.53.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  6. Medium, CVSS 5.3npmAmendedPublished

    Svelte vulnerable to XSS during SSR with contenteditable bind:innerText and bind:textContent

    CVE-2026-27901 · GHSA-phwv-c562-gvmh

    Affected
    • npm svelte <= 5.53.4
    Fixed in
    5.53.5· Vendor fix available
    Issue
    The contents of bind:innerText and bind:textContent on contenteditable elements were not properly escaped. This could enable HTML injection and Cross-site Scripting (XSS) if rendering untrusted data as the binding's initial value on the server.

    Recommended action: Upgrade to 5.53.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  7. Medium, CVSS 5.3npmAmendedPublished

    Svelte SSR attribute spreading includes inherited properties from prototype chain

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

    Affected
    • npm svelte <= 5.51.4
    Fixed in
    5.51.5· Vendor fix available
    Issue
    In server-side rendering, attribute spreading on elements (e.g. <div {...attrs}) enumerates inherited properties from the object's prototype chain rather than only own properties. In environments where Object.prototype has already been polluted — a precondition outside of Svelte's control — this can cause unexpected attributes to appear in SSR output or cause SSR to throw errors. Client-side rendering is not affected.

    Recommended action: Upgrade to 5.51.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  8. Medium, CVSS 5.1npmAmendedPublished

    Svelte SSR does not validate dynamic element tag names in

    CVE-2026-27122 · GHSA-m56q-vw4c-c2cp

    Affected
    • npm svelte <= 5.51.4
    Fixed in
    5.51.5· Vendor fix available
    Issue
    When using <svelte:element this={tag} in server-side rendering, the provided tag name is not validated or sanitized before being emitted into the HTML output. If the tag string contains unexpected characters, it can result in HTML injection in the SSR output. Client-side rendering is not affected.

    Recommended action: Upgrade to 5.51.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  9. Medium, CVSS 5.1npmAmendedPublished

    Svelte affected by cross-site scripting via spread attributes in Svelte SSR

    CVE-2026-27121 · GHSA-f7gr-6p89-r883

    Affected
    • npm svelte <= 5.51.4
    Fixed in
    5.51.5· Vendor fix available
    Issue
    Versions of svelte prior to 5.51.5 are vulnerable to cross-site scripting (XSS) during server-side rendering. When using spread syntax to render attributes from untrusted data, event handler properties are included in the rendered HTML output. If an application spreads user-controlled or external data as element attributes, an attacker can inject malicious event handlers that execute in victims' browsers.

    Recommended action: Upgrade to 5.51.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  10. Medium, CVSS 5.1npmAmendedPublished

    Svelte affected by XSS in SSR element

    CVE-2026-27119 · GHSA-h7h7-mm68-gmrc

    Affected
    • npm svelte >= 5.39.3, < 5.51.5
    Fixed in
    5.51.5· Vendor fix available
    Issue
    In certain circumstances, the server-side rendering output of an <option element does not properly escape its content, potentially allowing HTML injection in the SSR output. Client-side rendering is not affected.

    Recommended action: Upgrade to 5.51.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  11. High, CVSS 8.4npmAmendedPublished

    svelte is vulnerable to XSS with textarea bind:value

    GHSA-gw32-9rmw-qwww

    Affected
    • npm svelte >= 3.0.0, < 3.59.2
    Fixed in
    3.59.2· Vendor fix available
    Issue
    A server-side rendered <textarea with two-way bound value does not have its value correctly escaped in the rendered HTML. Details In SSR, <textarea bind:value={...} does not have its value escaped when it is rendered into the HTML as <textarea...</textarea. PoC Put this in a server-side-rendered Svelte component: Impact - Only affects SSR - Needs a <textarea bind:value filled by user content via two-way binding

    Recommended action: Upgrade to 3.59.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  12. Medium, CVSS 5.3npmAmendedPublished

    svelte vulnerable to Cross-site Scripting

    CVE-2025-15265 · GHSA-6738-r8g5-qwp3

    Affected
    • npm svelte >= 5.46.0, <= 5.46.3
    Fixed in
    5.46.4· Vendor fix available
    Issue
    An XSS vulnerability exists in Svelte 5.46.0-2 resulting from improper escaping of hydratable keys. If these keys incorporate untrusted user input, arbitrary JavaScript can be injected into server-rendered HTML. Details When using the hydratable function, the first argument is used as a key to uniquely identify the data, such that the value is not regenerated in the browser. This key is embedded into a <script block in the server-rendered <head without escaping unsafe characters. A malicious key can break out of the script context and inject arbitrary JavaScript into the HTML response. Impact This is a cross-site scripting vulnerability affecting applications that have the experimental.async flag enabled and use hydratable with keys incorporating untrusted user input. - Impact: Arbitrary JS execution in the client’s browser. - Exploitability: Remote, single-request if key is attacker-controlled. - Typical Outcomes: - Session/token theft - DOM defacement - CSRF bypass via…

    Recommended action: Upgrade to 5.46.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  13. Medium, CVSS 5.1npmAmendedPublished

    Svelte has a potential mXSS vulnerability due to improper HTML escaping

    CVE-2024-45047 · GHSA-8266-84wp-wv5c

    Affected
    • npm svelte < 4.2.19
    Fixed in
    4.2.19· Vendor fix available
    Issue
    A potential XSS vulnerability exists in Svelte for versions prior to 4.2.19. Details Svelte improperly escapes HTML on server-side rendering. It converts strings according to the following rules: - If the string is an attribute value: - " - &quot; - & - &amp; - Other characters - No conversion - Otherwise: - < - &lt; - & - &amp; - Other characters - No conversion The assumption is that attributes will always stay as such, but in some situation the final DOM tree rendered on browsers is different from what Svelte expects on server-side rendering. This may be leveraged to perform XSS attacks. More specifically, this can occur when injecting malicious content into an attribute within a <noscript tag. PoC A vulnerable page (+page.svelte): If a user accesses the following URL, then, alert(123) will be executed. Impact XSS, when using an attribute within a noscript tag

    Recommended action: Upgrade to 4.2.19 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  14. Medium, CVSS 6.1npmAmendedPublished

    Svelte vulnerable to XSS when using objects during server-side rendering

    CVE-2022-25875 · GHSA-wv8q-r932-8hc7

    Affected
    • npm svelte < 3.49.0
    Fixed in
    3.49.0· Vendor fix available
    Issue
    The package svelte before 3.49.0 is vulnerable to Cross-site Scripting (XSS) due to improper input sanitization and to improper escape of attributes when using objects during SSR (Server-Side Rendering). Exploiting this vulnerability is possible via objects with a custom toString() function.

    Recommended action: Upgrade to 3.49.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →