Media

Jodit has cross-site scripting (XSS) via <script> nested in SVG that bypasses clean-html sanitization

  • Publicada: 31.07.2026
  • Actualizado: 11.10.2026 10:22

A <script> element placed directly inside an <svg> (or MathML) container was not removed by Jodit's clean-html sanitizer.

The deny/allow tag filter compared node.nodeName against an upper-cased tag hash, but foreign (SVG/MathML) elements preserve their original-case node names — an SVG script reports "script", not "SCRIPT" — so the default denyTags list (which includes script) did not match it. The script therefore survived in the editor value and serialized output, where it could execute when the content was loaded back into a page or editor.

Proof of concept

html
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400" viewBox="0 0 124 124">
  <rect width="124" height="124" rx="24" fill="#000000"></rect>
  <script type="text/javascript">alert(document.domain);</script>
</svg>

Load the payload into the editor (e.g. via source mode) and the <script> is preserved in editor.value and executes.

Impact

Stored / DOM cross-site scripting. An application that persists editor output and later renders or re-opens it in Jodit can have attacker-supplied script run in a victim's (e.g. an administrator's) authenticated browser context.

Patch

Fixed in 4.13.6: the deny/allow lookup now normalises the tag name to upper case before matching, so a foreign namespace can no longer bypass the filter, while allowTags is still honoured.

Workaround

Upgrade to 4.13.6 or later. Server-side sanitization of stored HTML mitigates in the interim.

Credit

Reported by Roman Kis (@CrownKingClown).

Software afectado

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

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de npm jodit < 4.13.6 4.13.6

Referencias

Puntuación CVSS -
Vector CVSS
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Debilidad (CWE)
CWE-80
Plataforma
npm
Paquete
jodit
Publicada
31.07.2026
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-45qg-252v-3f7p - CC BY 4.0

Historial de vulnerabilidades: jodit

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
7
Primera → última
09.2022 07.2026
Sin corrección
2
Explotada en ataques
0

Distribución por gravedad

  • Alta 1
  • Media 6

Divulgaciones por año

  1. 2022: 1
  2. 2023: 1
  3. 2024: 0
  4. 2025: 0
  5. 2026: 5
  1. Jodit has cross-site scripting (XSS) via <script> nested in SVG that bypasses clean-html sanitization esta entrada
    Media CVE-2026-65841 < 4.13.6 4.13.6
  2. Media · 6.1 CVE-2023-42399 = 4.0.0-beta.86 sin corrección
  3. Media · 6.1 CVE-2022-23461 <= 3.24.2 sin corrección

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.