Vulnerabilities in pkg:npm/suneditor

PACKAGE
Advisory Identifier: GHSA-6rf4-v2fh-m6p4
Advisory Summary

CVE-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.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/suneditor

2 Known Advisory Record(s)

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

CVE Identifier CVE-2026-59167
GHSA Identifier GHSA-6rf4-v2fh-m6p4
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product SunEditor
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (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.

suneditor fixed: 2.47.11
npm install suneditor@2.47.11
Verify Direct and Transitive Dependencies

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

## 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: ```html <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: ```html <a:b src="/x" onclick="console.log('XSS:',document.domain,document.cookie)">click</a:b> ``` ```html <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: ```html <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. ---

CVE-2026-59167 Affected SunEditor Versions

1 component(s)
Fixed Versions:
2.47.11
Product / Package Ecosystem Affected Versions Fixed Version
suneditor
npm
< 2.47.11
2.47.11

References

Frequently Asked Questions

What is CVE-2026-59167?
CVE-2026-59167 is a security vulnerability in SunEditor involving Critical XSS vulnerability - sanitizer bypass under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which SunEditor versions are affected?
Affected versions include releases prior to 2.47.11 across affected packages: suneditor.
What version fixes CVE-2026-59167?
Upgrading to 2.47.11 (or the latest patched release for your respective branch) resolves the vulnerability.
Is suneditor affected?
Yes, suneditor is affected in releases prior to 2.47.11. Upgrade your dependency to 2.47.11 or later.
What is the CVSS score of CVE-2026-59167?
CVE-2026-59167 has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-59167?
CVE-2026-59167 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check npm dependencies for CVE-2026-59167?
Run the dependency tree command: 'npm ls suneditor'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}