suneditor
Affected
- introduced
0, fixed2.47.11(semver)
Fixed versions
2.47.11
Fix
- Fixed version
2.47.11npm install [email protected]
Advisory
Also known as: CVE-2026-59167
SunEditor: Critical XSS vulnerability - sanitizer bypass
Summary
SUNEDITOR v2.47.10 appears to allow JavaScript execution through crafted namespaced HTML elements.
The sanitization logic does not fully remove executable event-handler attributes from certain custom/namespaced tags. As a result, an attacker may be able to inject HTML content that executes JavaScript when the rendered element is interacted with.
This behavior was observed after the changes introduced in this commit:
https://github.com/JiHong88/suneditor/commit/9ed405fb0de676e56cd0e6a13c19c103ad5948d3
---
Affected Version
Confirmed vulnerable:
2.47.10Potentially affected:
---
Proof of Concept
The following payload preserves an executable event handler:
<a:b src="/x"><iframe src=javascript:alert(1)></iframe></a:b>
<p><a:b src="/x" onclick="document.body.style.background='red'">click</a:b></p>
Simplified PoC:
<a:b src="/x" onclick="console.log('XSS:',document.domain,document.cookie)">click</a:b>
<p><a:b src="/x" onmouseover="alert('XSS — '+document.domain)">📎 Click here for solutions</a:b></p>
---
Steps to Reproduce
2.47.10.---
Impact
This may allow an attacker to inject arbitrary JavaScript into rendered editor content.
Depending on how SUNEDITOR is integrated into an application, this could lead to:
---
Technical Details
The issue appears to be related to incomplete handling of namespaced/custom HTML elements such as:
<a:b>
Event-handler attributes such as onclick can remain attached to these crafted elements and execute when interacted with.
This suggests that the sanitization process may not consistently normalize and validate custom or namespaced elements before applying attribute filtering.
---
Suggested Remediation
Possible mitigations include:
---
Critical Basis: The source's own band: CRITICAL
0, fixed 2.47.11 (semver)2.47.11
2.47.11npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0