Every CVE Search/ Get API key

CVE-2026-59167

SunEditor: Critical XSS vulnerability - sanitizer bypass

10.0 CriticalFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

0.50%Up 0.1 points since Sep 24, 2026
90%50%10%1%

What each source reports

CVE List Score used 10.0

SunEditor: Critical XSS vulnerability - sanitizer bypass

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.

Record
CVE-2026-59167
CVSS 3.1
10.0 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-79
Updated
2026-11-02
EUVDEUVD-2026-85324 10.0

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.

Record
EUVD-2026-85324
CVSS 3.1
10.0 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-6rf4-v2fh-m6p4 10.0

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:

  • SUNEDITOR =< 2.47.10

Potentially affected:

  • Previous versions, if the same sanitization logic is still present

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

  1. Open SUNEDITOR using version 2.47.10.
  2. Insert the payload above into the editor.
  3. Save or render the generated content.
  4. Click the generated element.
  5. Observe that JavaScript is executed.

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:

  • Stored XSS
  • DOM manipulation
  • Session theft
  • Credential theft
  • Account takeover actions performed in the victim’s browser context

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:

  • Normalize DOM elements before sanitization.
  • Explicitly reject or unwrap unknown/custom/namespaced tags.
  • Strip all event-handler attributes from all elements, including unknown/custom elements.
  • Re-validate sanitized output after browser DOM parsing.
  • Add regression tests for namespaced/custom tag payloads.

Record
GHSA-6rf4-v2fh-m6p4
CVSS 3.1
10.0 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-79
Updated
2026-11-02
NVD 10.0

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.

Record
CVE-2026-59167
CVSS 3.1
10.0 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-79
Updated
2026-11-02
OSV 10.0

SunEditor: Critical XSS vulnerability - sanitizer bypass

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.

Record
CVE-2026-59167
CVSS 3.1
10.0 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-79
Updated
2026-11-02
OSVGHSA-6rf4-v2fh-m6p4 10.0

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:

  • SUNEDITOR =< 2.47.10

Potentially affected:

  • Previous versions, if the same sanitization logic is still present

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

  1. Open SUNEDITOR using version 2.47.10.
  2. Insert the payload above into the editor.
  3. Save or render the generated content.
  4. Click the generated element.
  5. Observe that JavaScript is executed.

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:

  • Stored XSS
  • DOM manipulation
  • Session theft
  • Credential theft
  • Account takeover actions performed in the victim’s browser context

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:

  • Normalize DOM elements before sanitization.
  • Explicitly reject or unwrap unknown/custom/namespaced tags.
  • Strip all event-handler attributes from all elements, including unknown/custom elements.
  • Re-validate sanitized output after browser DOM parsing.
  • Add regression tests for namespaced/custom tag payloads.

Record
GHSA-6rf4-v2fh-m6p4
CVSS 3.1
10.0 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Weakness
CWE-79
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
suneditor
npm
through 2.47.10
2.47.11
suneditor
npm
before 2.47.11
2.47.11

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-59167 is a critical vulnerability (CVSS 10.0) in Jihong88 Suneditor, published September 23, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.50%, the 42nd percentile. Fixed in suneditor 2.47.11.

References

MoveEnter Open