Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as low-privileged content author
-
DeliveryStore pre with entity-encoded language- class
-
ExploitVictim opens saved content in editor
-
ExecutionHover triggers innerHTML hover-button sink
-
ImpactExecute script in host page, hijack victim 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 | Requires the codeBlock plugin (part of SunEditor's bundled default plugin set) with a non-empty language list, which is the default. The application must load one user's saved editor content into another user's editor via setContents, the initial textarea value, paste, or html.insert - i.e. shared-document, CMS, or admin-moderation workflows where attacker content reaches a victim. The attacker needs the ability to store editor content (PR:L), and the victim must hover the mouse over the rendered code block (UI:P) for the innerHTML sink to fire. Payload is an entity-encoded value in a language- class on a <pre> (or <pre><code>) element that survives html.clean() because the class allowlist permits ^language- and the on-handler regex requires whitespace before 'on'. Affected versions are 3.0.0 through 3.4.2. Limiting factors: integrators who also perform strict server-side sanitization with a tight class allowlist may be unaffected (per the advisory), and exploitation depends on a victim hover rather than mere page load. |
| Impact | This is a genuine but mid-tier priority, best described as a real-but-conditional stored XSS rather than an emergency. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:P) and 5.1 'medium' base score tell a consistent story: network-reachable and low-complexity, but gated by PR:L (the attacker must be able to store editor content, i.e. an authenticated or otherwise content-contributing user) and UI:P (the victim must passively interact - here, hover over the code block). The impact metrics VC:N/VI:N/VA:N with SC:L/SI:L reflect that nothing on the editor component itself is harmed; instead script executes in the host page (a subsequent-system/scope effect), which the advisory confirms by noting the hover controller lives in the main document even in iframe mode. No EPSS score and no KEV listing are present in the input, so there is no evidence of active or automatable exploitation; the vuln.today Decision label is 'this_month', not act_now or emergency, which aligns with the medium severity. A detailed reproduction with a working-looking payload is published in the GHSA advisory, but the advisory itself states it is static analysis only and was not run in a browser, so a public PoC reference exists but is not verified as working exploit code. Net: prioritize patching within a normal monthly cycle, higher if you run a multi-user workflow (shared docs, CMS, admin moderation) where one user's content is opened in another user's editor. |
| Exploit ScenarioDerived | An authenticated low-privileged user (PR:L) saves editor content containing a <pre> code block whose language- class is entity-encoded, e.g. class="language-<img/src='x'/onerror='alert(document.domain)'>". When a second user - such as an admin moderator or another contributor in a shared-document/CMS workflow - later opens that content and moves the mouse over the code block (UI:P), the browser decodes the class into the hover button via innerHTML and the injected handler runs in the host page origin, enabling session/token theft or actions as the victim. A public PoC reference exists in the GHSA advisory; it is not verified as working exploit code (static analysis only). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 26, 2026
Stored cross-site scripting in the SunEditor WYSIWYG editor's codeBlock plugin (versions 3.0.0 through 3.4.2) lets an attacker who can save editor content plant a code block whose language value decodes to HTML markup, which is then written through innerHTML into the language hover button and executed when a victim moves the mouse over the block. The payload survives the built-in html.clean() sanitizer because it is entity-encoded in a language- class attribute: the class allowlist permits any token beginning with 'language-', and the on-handler filter only strips names preceded by whitespace, so no raw '>' or ' on' ever appears in the raw string. Successful exploitation is conditional on a workflow where one user's stored content is later loaded into another user's editor (shared documents, CMS editing, admin moderation) plus a victim hover rather than mere page load; the vendor released 3.4.3 to address it, and no confirmed public exploit code has been identified at time of analysis, although the upstream advisory publishes step-by-step reproduction payloads.
RemediationAI
Upgrade to SunEditor 3.4.3 or later; the vendor-released patch is 3.4.3, per the GHSA advisory at https://github.com/JiHong88/suneditor/security/advisories/GHSA-j4jp-7r3h-rf28, and the npm package lists the fix as 3.4.3 for the >= 3.0.0 <= 3.4.2 range. The advisory's suggested code-level remediation is to treat the language name as text rather than HTML - build the hover-button spans with createElement and set the label with textContent, escape currentLang before it reaches SelectMenu.create(), restrict accepted language identifiers in #getPreLang, #setLang and html.#unwrapPreCode to a pattern such as /^[A-Za-z0-9_+#.-]+$/, and tighten the sanitizer's class allowlist entry from ^language- to ^language-[\w+#.-]+$. Where an immediate upgrade is not possible, two compensating controls are available, each with trade-offs: (1) disable the codeBlock plugin or ship it with an empty language list, which removes the hover button and the innerHTML sink but also removes syntax-highlighted code blocks and the language selector from the editor; (2) add strict server-side sanitization on stored editor content with a tight class allowlist that rejects entity-encoded markup in language- values - per the advisory, integrators already doing this may be unaffected - at the cost of a second sanitization layer that must be kept in sync with the editor's own output and may strip legitimate class names. Neither workaround removes the underlying bug, and both leave already-stored malicious content in place unless existing records are re-sanitized.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SunEditor is a JavaScript WYSIWYG editor distributed on npm as the 'suneditor' package and identified in CPE data as cpe:2.3:a:jihong88:suneditor. The flaw is CWE-79 (improper neutralization of input during web page generation), specifically a sanitizer-bypass leading to a DOM-based DOM sink. In the codeBlock plugin, #getPreLang reads the language identifier straight out of the content itself using className.match(/language-(\S+)/) on the <pre> element, and that value is then concatenated into the hover controller's button via innerHTML (codeBlock.js:304); the same value also reaches SelectMenu.create() as a menu label, where <li> markup is assembled from strings. Sanitization fails on two fronts: the default class allowlist in src/core/schema/options.js includes the pattern ^language-, and the attribute whitelist accepts class, while the on-handler regex used by #CleanElements requires whitespace before 'on' and therefore never sees the entity-encoded '<img/src=x/onerror=...>' variant, which also carries no raw '>'. The browser subsequently decodes the entities into className, and the decoded markup is parsed as HTML in the host page origin. The <pre><code class="language-..."> form is equally affected because #unwrapPreCode copies the matched class onto the <pre>. The hover UI is enabled by default whenever the language list (DEFAULT_LANGS) is non-empty, which is the shipped configuration, and the hover controller lives in the main document even when the editor runs in iframe mode.
Know when Suneditor gets its next vulnerability
- 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:N/VI:N/VA:N/SC:L/SI:L/SA:N
Stored XSS needs an authenticated content author (PR:L) and a victim hover (UI:R); decoded markup executes in the host page beyond the editor (S:C), yielding limited C/I and no availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
SunEditor from 3.0.0 before 3.4.3 contains a stored cross-site scripting vulnerability in the codeBlock plugin that allows attackers to inject script via entity-encoded pre language class values. Attackers can store content whose language- class decodes to HTML written via innerHTML into the hover button, executing script when victims hover over the block.
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.
Stored cross-site scripting in SunEditor prior to 2.47.11 allows an attacker-supplied editor payload to survive the libr
Stored cross-site scripting in SunEditor through 3.3.1 allows an attacker to bypass the html.clean() URL sanitizer by en
Stored cross-site scripting in SunEditor before 3.4.0 lets an attacker who can persist content inside an h1-h6 header ru
Stored cross-site scripting in SunEditor (npm `suneditor`) through 3.3.1 lets a low-privilege author plant an HTML-encod
Stored cross-site scripting in the SunEditor WYSIWYG library (versions 3.0.0 up to, but not including, 3.4.0) allows cra
Stored cross-site scripting in SunEditor's FileUpload plugin lets an authenticated user who can upload files inject HTML
EUVD-2026-136757
NVD
CVE.org
EPSS
GitHub
Exploit-DB