Vulnerability library
Security checkMarch 11, 2026

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

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmsvelte

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

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.

Recommendation

Update the svelte package to the latest compatible version. Followings are version details:

  • Affected version(s): <= 5.53.4
  • Patched version(s): 5.53.5

References

Could your website be exposed too?

SmartScanner can check your website for Svelte vulnerable to XSS during SSR with contenteditable `bind:innerText` and `bind:textContent` and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated March 11, 2026