llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · nukeviet/nukeviet

GHSA-WJPM-J8R9-F6WR

Stored XSS via SVG file upload

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
5.4
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición131 dDesde la divulgación, 12 jul 2026, 9:49 p. m.
Detección129 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. No hay versión corregida: aplique mitigaciones.
Calma e higiene de parches: mi fórmula secreta.Ni pánico ni ignorarla: término medio.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
13 jul 26
19 nov 26
21 nov 26
13 jul 26
14 ago 26
16 sept 26
19 oct 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-WJPM-J8R9-F6WR divulgada · CVSS 5.4 (GitHub)
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

NukeViet CMS versions prior to 4.5 (patched commit `52a1cc4`) allow authenticated users with file upload permissions to upload SVG files containing embedded JavaScript. When the SVG is served as `image/svg+xml` and rendered inline in an article, the browser executes the script in the context of the CMS domain — a Stored Cross-Site Scripting (XSS) vulnerability.

Affected Component

`vendor/vinades/nukeviet/Files/Upload.php` — `check_svg_tmpfile()` and `verify_image()`

Vulnerability Details

The original implementation used `simplexml_load_file()` to parse uploaded SVGs and applied only a regex blacklist to block event handlers. This approach was bypassable via multiple vectors:

  • Event handler attributes: `onload=`, `onmouseover=`, etc.
  • `<script>` and `<foreignObject>` tags: embedding arbitrary HTML/JS
  • Namespace injection: `<html:script xmlns:html="http://www.w3.org/1999/xhtml">`
  • Processing instructions: `<?xml-stylesheet type="text/javascript" href="...">` to load external JS
  • SMIL animation: `<animate attributeName="onload" to="alert(1)">` injecting event handlers
  • XXE (PHP < 8.0): `<!ENTITY xxe SYSTEM "file:///etc/passwd">` — arbitrary local file read via external entity expansion

Attack Scenario

  1. An attacker with editor/contributor access crafts a malicious SVG:
  2. The file passes the original validation and is saved to the uploads directory.
  3. The attacker embeds the SVG in a published article.
  4. Any visitor (including administrators) who views the article triggers the payload, exfiltrating their session cookie.

Impact

  • Session hijacking (including administrator accounts)
  • Credential theft
  • Defacement / malicious redirects
  • On PHP 5.6–7.x without the fix: arbitrary local file read via XXE

Patches

Fixed in commit `52a1cc4e0`. The patch replaces the regex-blacklist approach with:

  1. DOMDocument whitelist validation (`sanitize_svg_dom()`) — rejects any element or attribute not on an explicit allowlist; blocks `on*` event handlers, dangerous tags (`<script>`, `<foreignObject>`, `<iframe>`), namespace-prefixed elements, and processing instructions.
  2. XXE protection — `libxml_disable_entity_loader(true)` for PHP < 8.0 combined with `LIBXML_NONET`, preventing both `file://` and network entity expansion.
  3. Defense-in-depth regex in `verify_image()` — catches raw `on*=` patterns before DOM parsing.
  4. CSS injection checks (`svg_css_is_dangerous()`) — blocks `@import`, `url(https?:...)`, `-moz-binding`, and `expression()` in `style` attributes and `<style>` elements.
  5. `X-Content-Type-Options: nosniff` header applied to `.svg` files via `.htaccess`.

Workaround

If upgrading is not immediately possible, disable SVG uploads by removing `svg` from the list of allowed file extensions in the NukeViet admin panel.

References

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
  • CWE-611: Improper Restriction of XML External Entity Reference
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:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:C
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
7.2/ 10Alto
Vector 7.2 (fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
nukeviet/nukeviet≤ 4.5.08
4.5.08
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistnukeviet/nukeviet
Sin parche — — —
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/nukeviet/nukeviet/security/advisories/GHSA-wjpm-j8r9-f6wr

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