GHSA-6RF4-V2FH-M6P4
Vulnerability from github – Published: 2026-09-24 14:57 – Updated: 2026-09-24 14:57Summary
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
- Open SUNEDITOR using version
2.47.10. - Insert the payload above into the editor.
- Save or render the generated content.
- Click the generated element.
- 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.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 2.47.10"
},
"package": {
"ecosystem": "npm",
"name": "suneditor"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.47.11"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-59167"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2026-09-24T14:57:55Z",
"nvd_published_at": "2026-09-23T14:17:07Z",
"severity": "CRITICAL"
},
"details": "## Summary\n\nSUNEDITOR `v2.47.10` appears to allow JavaScript execution through crafted namespaced HTML elements.\n\nThe 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.\n\nThis behavior was observed after the changes introduced in this commit:\n\nhttps://github.com/JiHong88/suneditor/commit/9ed405fb0de676e56cd0e6a13c19c103ad5948d3\n\n---\n\n## Affected Version\n\nConfirmed vulnerable:\n\n* SUNEDITOR =\u003c `2.47.10`\n\nPotentially affected:\n\n* Previous versions, if the same sanitization logic is still present\n\n---\n\n## Proof of Concept\n\nThe following payload preserves an executable event handler:\n\n```html\n\u003ca:b src=\"/x\"\u003e\u003ciframe src=javascript:alert(1)\u003e\u003c/iframe\u003e\u003c/a:b\u003e\n\n\u003cp\u003e\u003ca:b src=\"/x\" onclick=\"document.body.style.background=\u0027red\u0027\"\u003eclick\u003c/a:b\u003e\u003c/p\u003e\n```\n\nSimplified PoC:\n\n```html\n\u003ca:b src=\"/x\" onclick=\"console.log(\u0027XSS:\u0027,document.domain,document.cookie)\"\u003eclick\u003c/a:b\u003e\n```\n\n```html\n\u003cp\u003e\u003ca:b src=\"/x\" onmouseover=\"alert(\u0027XSS \u2014 \u0027+document.domain)\"\u003e\ud83d\udcce Click here for solutions\u003c/a:b\u003e\u003c/p\u003e\n```\n---\n\n## Steps to Reproduce\n\n1. Open SUNEDITOR using version `2.47.10`.\n2. Insert the payload above into the editor.\n3. Save or render the generated content.\n4. Click the generated element.\n5. Observe that JavaScript is executed.\n\n---\n\n## Impact\n\nThis may allow an attacker to inject arbitrary JavaScript into rendered editor content.\n\nDepending on how SUNEDITOR is integrated into an application, this could lead to:\n\n* Stored XSS\n* DOM manipulation\n* Session theft\n* Credential theft\n* Account takeover actions performed in the victim\u2019s browser context\n\n---\n\n## Technical Details\n\nThe issue appears to be related to incomplete handling of namespaced/custom HTML elements such as:\n\n```html\n\u003ca:b\u003e\n```\n\nEvent-handler attributes such as `onclick` can remain attached to these crafted elements and execute when interacted with.\n\nThis suggests that the sanitization process may not consistently normalize and validate custom or namespaced elements before applying attribute filtering.\n\n---\n\n## Suggested Remediation\n\nPossible mitigations include:\n\n* Normalize DOM elements before sanitization.\n* Explicitly reject or unwrap unknown/custom/namespaced tags.\n* Strip all event-handler attributes from all elements, including unknown/custom elements.\n* Re-validate sanitized output after browser DOM parsing.\n* Add regression tests for namespaced/custom tag payloads.\n\n---",
"id": "GHSA-6rf4-v2fh-m6p4",
"modified": "2026-09-24T14:57:55Z",
"published": "2026-09-24T14:57:55Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/JiHong88/suneditor/security/advisories/GHSA-6rf4-v2fh-m6p4"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-59167"
},
{
"type": "WEB",
"url": "https://github.com/JiHong88/suneditor/issues/1646"
},
{
"type": "WEB",
"url": "https://github.com/JiHong88/suneditor/commit/a94ace269c7102bfb6de58a27a6547bc4eb09045"
},
{
"type": "PACKAGE",
"url": "https://github.com/JiHong88/suneditor"
},
{
"type": "WEB",
"url": "https://github.com/JiHong88/suneditor/releases/tag/2.47.11"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "SunEditor: Critical XSS vulnerability - sanitizer bypass"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.