CVE-2026-27901: Svelte InnerText` And `bind:textContent` Vulnerability
MODERATECVE-2026-27901 is a MODERATE innertext` and `bind:textcontent` vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Svelte libraries in the npm ecosystem. The issue involves innertext` and `bind:textcontent`. Remediation is available by upgrading affected packages to version 5.53.5.
CVE-2026-27901 at a Glance
How to Fix CVE-2026-27901
To remediate this vulnerability, upgrade all affected Svelte dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install svelte@5.53.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls svelte
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-27901, inspect your project dependencies using npm:
npm ls svelte
Analyze the terminal output to locate any version of Svelte in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.53.5), your application is affected.
Note: The npm ls svelte command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where 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. In Svelte, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-27901 Affected Svelte Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
svelte
|
npm |
< 5.53.5
|
5.53.5
|
References
Frequently Asked Questions
What is CVE-2026-27901?
Which Svelte versions are affected?
What version fixes CVE-2026-27901?
Is svelte affected?
What CWE is associated with CVE-2026-27901?
How can I check npm dependencies for CVE-2026-27901?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-phwv-c562-gvmh",
"modified" : "2026-02-26T22:24:54Z",
"published" : "2026-02-26T22:24:54Z",
"aliases" : [ "CVE-2026-27901" ],
"summary" : "Svelte vulnerable to XSS during SSR with contenteditable `bind:innerText` and `bind:textContent`",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:H/SI:H/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "svelte"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.53.5"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.53.4"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/sveltejs/svelte/security/advisories/GHSA-phwv-c562-gvmh"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-27901"
}, {
"type" : "WEB",
"url" : "https://github.com/sveltejs/svelte/commit/0df5abcae223058ceb95491470372065fb87951d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sveltejs/svelte"
}, {
"type" : "WEB",
"url" : "https://github.com/sveltejs/svelte/releases/tag/svelte@5.53.5"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-26T22:24:54Z",
"nvd_published_at" : "2026-02-26T02:16:20Z"
}
}