CVE-2026-27901
Received Received - Intake
HTML Injection and XSS in Svelte bind:innerText on contenteditable

Publication date: 2026-02-26

Last updated on: 2026-03-05

Assigner: GitHub, Inc.

Description
Svelte performance oriented web framework. Prior to version 5.53.5, 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. Version 5.53.5 fixes the issue.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-26
Last Modified
2026-03-05
Generated
2026-06-16
AI Q&A
2026-02-26
EPSS Evaluated
2026-06-15
NVD
EUVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
svelte svelte to 5.53.5 (exc)
svelte svelte 5.53.5
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability affects the Svelte web framework versions prior to 5.53.5. It involves improper escaping of the contents bound to `bind:innerText` and `bind:textContent` on elements with the `contenteditable` attribute during server-side rendering. Because these bindings were not properly escaped, an attacker could inject malicious HTML or JavaScript code, leading to Cross-Site Scripting (XSS) attacks. The vulnerability arises when untrusted data is rendered as the initial value of these bindings on the server.

The issue was fixed in version 5.53.5 by ensuring that the `innerText` and `textContent` bindings on `contenteditable` elements are properly escaped before rendering, preventing malicious scripts from executing.

Impact Analysis

This vulnerability can allow an attacker to perform Cross-Site Scripting (XSS) attacks by injecting malicious HTML or JavaScript into web pages rendered by the Svelte framework when using `bind:innerText` or `bind:textContent` on `contenteditable` elements. Such attacks can compromise the confidentiality and integrity of the affected system and any subsequent systems interacting with it.

  • Confidentiality impact on the vulnerable system is low, but the impact on subsequent systems can be high.
  • Integrity impact on the vulnerable system is none, but the impact on subsequent systems can be high.
  • Availability is not affected.

The attack can be remotely exploited without requiring authentication, although it has a high attack complexity and requires specific conditions to bypass security mechanisms.

Compliance Impact

I don't know

Detection Guidance

[{'type': 'paragraph', 'content': 'This vulnerability can be detected by identifying if your system is running a vulnerable version of the Svelte framework (version 5.53.4 or earlier) that improperly escapes `bind:innerText` and `bind:textContent` on `contenteditable` elements during server-side rendering.'}, {'type': 'paragraph', 'content': 'To detect the vulnerability on your system, you can check the installed Svelte package version using the following command in your project directory:'}, {'type': 'list_item', 'content': 'npm list svelte'}, {'type': 'paragraph', 'content': 'If the version is 5.53.4 or earlier, your system is vulnerable.'}, {'type': 'paragraph', 'content': 'Additionally, you can search your codebase for usage of `bind:innerText` or `bind:textContent` on elements with the `contenteditable` attribute to identify potential vulnerable bindings:'}, {'type': 'list_item', 'content': "grep -r 'bind:innerText' ./"}, {'type': 'list_item', 'content': "grep -r 'bind:textContent' ./"}, {'type': 'paragraph', 'content': 'Monitoring network traffic for suspicious HTML or script injection attempts in contenteditable fields may also help detect exploitation attempts, but no specific detection commands are provided.'}] [1, 2]

Mitigation Strategies

The immediate and recommended mitigation step is to upgrade the Svelte framework to version 5.53.5 or later, where the vulnerability has been fixed by properly escaping `bind:innerText` and `bind:textContent` bindings on `contenteditable` elements.

If upgrading immediately is not possible, avoid using `bind:innerText` and `bind:textContent` on `contenteditable` elements with untrusted data during server-side rendering to reduce the risk of HTML injection and Cross-Site Scripting (XSS).

Review your codebase for any such bindings and sanitize or escape data manually before rendering.

Additionally, consider implementing Content Security Policy (CSP) headers to help mitigate the impact of potential XSS attacks.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-27901. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart