Vulnerabilities in pkg:npm/suneditor
PACKAGECVE-2026-59167 is a CRITICAL (CVSS 10.0) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting SunEditor libraries in the npm ecosystem. The issue involves critical xss vulnerability - sanitizer bypass. Remediation is available by upgrading affected packages to version 2.47.11.
pkg:npm/suneditor
Vulnerability advisories affecting package pkg:npm/suneditor. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-6rf4-v2fh-m6p4 | CVE-2026-59167 | CRITICAL | SunEditor: Critical XSS vulnerability - sanitizer bypass |
| GHSA-w93q-cq9w-58p7 | CVE-2026-54606 | HIGH | SunEditor Embed Plugin has DOM XSS via External Script Element After Iframe Embed |
CVE-2026-59167 at a Glance
Security Impact
CVSS: 10.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2026-59167
To remediate this vulnerability, upgrade all affected SunEditor dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install suneditor@2.47.11
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls suneditor
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-59167, inspect your project dependencies using npm:
npm ls suneditor
Analyze the terminal output to locate any version of SunEditor in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.47.11), your application is affected.
Note: The npm ls suneditor command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In SunEditor, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-59167 Affected SunEditor Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
suneditor
|
npm |
< 2.47.11
|
2.47.11
|
References
Frequently Asked Questions
What is CVE-2026-59167?
Which SunEditor versions are affected?
What version fixes CVE-2026-59167?
Is suneditor affected?
What is the CVSS score of CVE-2026-59167?
What CWE is associated with CVE-2026-59167?
How can I check npm dependencies for CVE-2026-59167?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6rf4-v2fh-m6p4",
"modified" : "2026-09-24T14:57:55Z",
"published" : "2026-09-24T14:57:55Z",
"aliases" : [ "CVE-2026-59167" ],
"summary" : "SunEditor: Critical XSS vulnerability - sanitizer bypass",
"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 =< `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<a:b src=\"/x\"><iframe src=javascript:alert(1)></iframe></a:b>\n\n<p><a:b src=\"/x\" onclick=\"document.body.style.background='red'\">click</a:b></p>\n```\n\nSimplified PoC:\n\n```html\n<a:b src=\"/x\" onclick=\"console.log('XSS:',document.domain,document.cookie)\">click</a:b>\n```\n\n```html\n<p><a:b src=\"/x\" onmouseover=\"alert('XSS — '+document.domain)\">📎 Click here for solutions</a:b></p>\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’s 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<a:b>\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---",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "suneditor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.47.11"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.47.10"
}
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-24T14:57:55Z",
"nvd_published_at" : "2026-09-23T14:17:07Z"
}
}