Crítica

SunEditor: Critical XSS vulnerability - sanitizer bypass

  • Publicada: 24.09.2026
  • Actualizado: 11.10.2026 10:22

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.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de npm suneditor < 2.47.11 2.47.11

Referencias

Puntuación CVSS 10/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Debilidad (CWE)
CWE-79
Plataforma
npm
Paquete
suneditor
Publicada
24.09.2026
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-6rf4-v2fh-m6p4 - CC BY 4.0

Historial de vulnerabilidades: suneditor

Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Entradas en total
2
Primera → última
08.2026 09.2026
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Crítica 1
  • Alta 1

Divulgaciones por año

  1. 2026: 2
  1. SunEditor: Critical XSS vulnerability - sanitizer bypass esta entrada
    Crítica · 10.0 CVE-2026-59167 < 2.47.11 2.47.11

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.