CVE-2026-54606: SunEditor DOM XSS Vulnerability via External Script Element After Iframe Embed

suneditor Updated 26 Aug 2026

Summary

26/08/2026
Yes i
High
8.5

CVE-2026-54606: SunEditor Embed Plugin has DOM XSS via External Script Element After Iframe Embed. Affects suneditor versions < 3.1.4. Fixed in 3.1.4. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

SunEditor is a lightweight and customizable WYSIWYG text editor built for web applications. It allows users to create rich text content easily, supporting various features such as image uploads, video embeds, and more. However, a vulnerability in the Embed plugin allows for DOM-based Cross-Site Scripting (XSS), which can be exploited if user-generated content is not properly sanitized.

Vulnerability Detail

A DOM-based Cross-Site Scripting (XSS) vulnerability exists in the SunEditor Embed plugin. This vulnerability arises when crafted iframe embed HTML is followed by an external <script src=...> element, which bypasses the plugin's sanitization logic. The plugin appends the attacker-controlled script element to the live DOM, leading to JavaScript execution in the context of the editor page. If an application stores or reflects SunEditor content without additional backend sanitization, it can result in stored or reflected XSS when another user interacts with the malicious content. The vulnerability is particularly severe when content is stored in a backend and later rendered for users without proper sanitization.

How To Fix

Latest published version: 3.3.3 as of 22 Oct 2026

npm install suneditor@3.3.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.1.4

This is the first release that contains the fix.

npm install suneditor@3.1.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, modify the Embed plugin's code to prevent the recreation of script elements from user-controlled embed HTML. You can implement the following code snippet:

if (/^script$/i.test(chd.nodeName)) {

continue;

}

Conclusion

The SunEditor Embed plugin has a critical vulnerability that allows for DOM-based XSS through improperly handled user-generated content. It is essential to update to the latest version to mitigate this risk and ensure that all user inputs are properly sanitized to prevent exploitation.

See every vulnerability recorded for suneditor →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 8.5, indicating a high severity level.

You can use Vulert to monitor and alert in real-time for open-source vulnerabilities in your software. Without requiring access to the code or installation, simply use your package-lock.json file.

An attacker can execute arbitrary JavaScript in another user's browser, potentially allowing account actions, modification of editor content, or access to sensitive data.

Yes, you can implement the provided workaround to prevent script elements from being appended to the DOM until you can update to the patched version.

You can find detailed information about this vulnerability in the advisory database or on the GitHub repository for SunEditor.

Related vulnerabilities

Recent vulnerabilities recorded for suneditor.

How To Fix

Latest published version: 3.3.3 as of 22 Oct 2026

npm install suneditor@3.3.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.1.4

This is the first release that contains the fix.

npm install suneditor@3.1.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback