llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · sanitize-html

GHSA-6WRV-5CP6-H3C5

sanitize-html mXSS via namespace-blind MathML integration point

Parche disponible
Descargar PNG JSON
CVSS 3.1
3.7
Baja
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición8 dDesde la divulgación, 11 nov 2026, 3:28 p. m.
Detección6 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 2.18.2
Monitoreo
Detectada +1
11 nov 26
18 nov 26
20 nov 26
11 nov 26
13 nov 26
16 nov 26
18 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-6WRV-5CP6-H3C5 divulgada · CVSS 3.7 (GitHub)
Divulgación Modificada Última actualización del registro
Remediación Parche 2.18.2 sanitize-html · 0 d desde divulgación
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

With math, annotation-xml and style allowed, sanitize-html 2.18.1 returns the payload unchanged and it executes on innerHTML. htmlparser2 treats annotation-xml as an HTML integration point in every namespace and ignores its encoding attribute, so the inner style is RAWTEXT to the parser but foreign content to Chromium.

Details

htmlparser2 Parser.ts:103 builds htmlIntegrationElements with no namespace or encoding check; Parser.ts:432 pushes ForeignContext.None for every match, so the inner style becomes RAWTEXT and its body reaches sanitize-html as one text node. Chromium keeps annotation-xml in foreign content unless encoding is text/html, does not RAWTEXT the style, and breaks out on img, creating a live element with its handler. sanitize-html index.js:671-676 appends that body raw; the textarea/xmp branches at index.js:680-704 do escape theirs, so the 2.17.6 fix was never extended to style. Suggested fix: escape < unconditionally in style bodies; in htmlparser2 split the set and gate annotation-xml on encoding.

Proof of concept
options = { allowedTags: ['math','annotation-xml','style'], allowVulnerableTags: true }
in = <math><annotation-xml><style><img src=x onerror=alert(1)></style></annotation-xml></math>
sanitizeHtml(in, options) returns in byte for byte, and sanitizeHtml(output, options) returns it again. Assigning the output to innerHTML fires the handler.
Impact

XSS in the session of any viewer, in applications that allow those three tags. img and on* do not need to be allowed.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
sanitize-html< 2.18.2
2.18.2
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmsanitize-html
Corregida 2.18.2 0 d 2.18.2 no afectada
Versiones corregidas2.18.2
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/apostrophecms/apostrophe/security/advisories/GHSA-6wrv-5cp6-h3c5

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.