CVE-2026-54606

SunEditor: DOM XSS in SunEditor Embed Plugin via External Script Element After Iframe Embed

Published Aug 26, 2026 CVSS 4.0 · 8.5 High EPSS < 1% KEV · Not listed
Description
SunEditor is a lightweight and powerful WYSIWYG editor in vanilla JavaScript with no dependencies. Prior to 3.1.4, the SunEditor Embed plugin in src/plugins/modal/embed.js parses attacker-controlled raw embed HTML with DOMParser and processes the resulting DOM nodes. When an external script element follows a valid iframe, the plugin recreates a script element from the attacker-controlled src attribute and appends it to the live DOM, causing JavaScript execution in the editor page. If an application stores or reflects SunEditor content without additional backend sanitization, an attacker who can submit embed HTML can trigger stored or reflected cross-site scripting when another user opens, previews, renders, or edits the content, enabling access to page data and account actions as the victim. This issue is fixed in version 3.1.4.

Analysis

AI-generated

Technical impact

The vulnerability allows an attacker to inject malicious script tags through the Embed plugin's handling of externally referenced scripts that follow an iframe. This script is executed in the context of the editor page, providing the attacker with the ability to read or manipulate page data, perform account actions, or exfiltrate information. The weakness is a classic DOM based XSS flaw (CWE‑79).

Affected Systems

The issue affects SunEditor by JiHong88 for all installed versions prior to 3.1.4, specifically 3.1.3 and earlier. Version 3.1.4 and above contain the fix.

Risk and Exploitability

The CVSS score of 8.5 indicates a high severity; the EPSS is not available and the vulnerability is not listed in KEV. Attackers can exploit this only if they are able to submit embed HTML that is later stored or reflected by an application, then made visible to users who view or edit that content. Based on the description, the likely attack vector is a stored or reflected XSS episode triggered by the editor; this inference is drawn from the need to supply crafted embed code and the resulting JavaScript execution in the editor page.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade SunEditor to version 3.1.4 or later to apply the vendor’s fix.
  • If upgrading is not possible, disable or remove the Embed plugin from the editor configuration.
  • Implement server‑side sanitization that strips <script> elements and external script references from content before storing or rendering it.

Generated by OpenCVE AI on August 26, 2026 at 17:30 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-w93q-cq9w-58p7 SunEditor Embed Plugin has DOM XSS via External Script Element After Iframe Embed
History
Type Values Removed Values Added
First Time appeared Jihong88
Jihong88 suneditor
Vendors & Products Jihong88
Jihong88 suneditor
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description SunEditor is a lightweight and powerful WYSIWYG editor in vanilla JavaScript with no dependencies. Prior to 3.1.4, the SunEditor Embed plugin in src/plugins/modal/embed.js parses attacker-controlled raw embed HTML with DOMParser and processes the resulting DOM nodes. When an external script element follows a valid iframe, the plugin recreates a script element from the attacker-controlled src attribute and appends it to the live DOM, causing JavaScript execution in the editor page. If an application stores or reflects SunEditor content without additional backend sanitization, an attacker who can submit embed HTML can trigger stored or reflected cross-site scripting when another user opens, previews, renders, or edits the content, enabling access to page data and account actions as the victim. This issue is fixed in version 3.1.4.
Title SunEditor: DOM XSS in SunEditor Embed Plugin via External Script Element After Iframe Embed
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 8.5, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 26, 2026, 6:28 PM
Reserved
Jun 15, 2026, 7:45 PM
Status
Deferred
Published
Aug 26, 2026, 4:16 PM
Modified
Sep 9, 2026, 9:09 PM