CVE-2026-59167
SunEditor: Critical XSS vulnerability - sanitizer bypass
Severity by source
Trivy's own label is CRITICAL. Rated critical by GHSA.
Description
SunEditor is a lightweight and powerful WYSIWYG editor in vanilla JavaScript with no dependencies. Prior to 2.47.11, the sanitizer in src/lib/core.js does not consistently reject namespaced or custom HTML elements, allowing event-handler attributes to remain on crafted elements. When an application renders attacker-controlled editor content and a user interacts with the element, the retained handler can execute script in the application's browser origin, enabling stored cross-site scripting, data exposure, or unauthorized browser-context actions. This issue is fixed in version 2.47.11.
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| npm::GitHub Security Advisory npm | suneditor | 2.47.11 |
References
- https://github.com/JiHong88/suneditor
- https://github.com/JiHong88/suneditor/commit/a94ace269c7102bfb6de58a27a6547bc4eb09045
- https://github.com/JiHong88/suneditor/issues/1646
- https://github.com/JiHong88/suneditor/releases/tag/2.47.11
- https://github.com/JiHong88/suneditor/security/advisories/GHSA-6rf4-v2fh-m6p4
- https://nvd.nist.gov/vuln/detail/CVE-2026-59167