llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · getkirby/cms

GHSA-5H3F-PVR7-CR27

Incomplete URL normalization in the Sane sanitizer for SVG files

Sin parche publicado
Descargar PNG JSON
CVSS 4.0
5.1
Media
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:N/SA:L Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición64 dDesde la divulgación, 16 sept 2026, 5:51 a. m.
Detección63 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
16 sept 26
18 nov 26
19 nov 26
16 sept 26
2 oct 26
18 oct 26
3 nov 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-5H3F-PVR7-CR27 divulgada · CVSS 5.1 (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
TL;DR

This vulnerability affects all Kirby sites that accept SVG uploads from users who may not be fully trusted, as well as sites that pass untrusted SVG through `Sane::sanitizeFile()`, `$file->sanitizeContents()` or a sanitizing `file.create:before` hook. The attack requires an authenticated Panel user with permission to upload files.

Your Kirby sites are *not* affected if every user who can upload files is fully trusted, or if SVG uploads are not accepted by any of your file blueprints. This is not a cross-site scripting issue: the `javascript:`, `vbscript:`, `data:` and related schemes remain correctly blocked.

This vulnerability is of medium severity for affected sites.

----

Affected components

`Dom::isAllowedUrl()` is the URL gate for every handler in the `Kirby\Sane` package. It is reached through `Sane\Svg::validate()`, which Kirby's default upload protection performs on every uploaded SVG, as well as `Sane\Svg::sanitize()`, `Sane::sanitizeFile()`, `$file->sanitizeContents()` and any site or plugin code that cleans uploaded SVG or HTML. It is applied to link and source attributes and to URLs extracted from `<style>` elements.

The `Sane\Svg` handler is the one that matters here: it restricts SVG documents to referencing no external domain at all. The `Sane\Html` and `Sane\Xml` handlers inherit a permissive domain default and are not meaningfully affected.

Alongside the URL checks, the same shortcoming affected the guard in `Sane\Svg::sanitizeAttr()` that blocks e.g. nested `<use>` constructs.

Impact

In affected releases, several of the sanitizer's restrictions inspected the raw attribute value rather than the value a browser would resolve. A URL could therefore be accepted even though the rule being enforced would have rejected what it actually points to.

An authenticated Panel user who can upload an SVG could use this to store a file that Kirby accepted as clean but that still references an attacker-controlled origin. When such a file is rendered, the reference is fetched, disclosing the viewer's IP address, User-Agent and request timing to a third party; a link inside the document can likewise point off-site, in a document whose domain policy is supposed to be empty. The same shortcoming allowed the nested `<use>` guard to be skipped, so an uploaded SVG could exhaust the resources of the browser rendering it.

Patches

The problem has been patched in Kirby 5.6.0 https://github.com/getkirby/kirby/releases/tag/5.6.0 and Kirby 4.9.6 https://github.com/getkirby/kirby/releases/tag/4.9.6.

In these releases, a new `Url::normalize()` method brings a URL into the same form a browser derives from it before resolving it. `Dom::isAllowedUrl()` now runs all of its checks against this normalized form, and `Sane\Svg::sanitizeAttr()` normalizes the attribute value the same way before it inspects it, so the nested `<use>` guard applies again.

Note that SVG files that were accepted before the patch may still contain such references.

Workarounds

Until you can update:

  • Do not accept SVG uploads from users you do not fully trust.
  • Embed uploaded SVG files through an `<img>` element rather than inlining them. This covers the external reference vectors, but not the nested `<use>` one.
Credits

Thanks to @iRevivalx for responsibly reporting the identified issue.

Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
Requisitos de ataqueAT:N
NingunoPresentes
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:P
NingunaPasivaActiva
Confid. (sistema)VC:N
AltoBajoNinguno
Integridad (sistema)VI:N
AltoBajoNinguno
Disponib. (sistema)VA:N
AltoBajoNinguno
Confid. (posterior)SC:L
AltoBajoNinguno
Integridad (posterior)SI:N
AltoBajoNinguno
Disponib. (posterior)SA:L
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
getkirby/cms≤ 4.9.5
4.9.5
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistgetkirby/cms
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/getkirby/kirby/security/advisories/GHSA-5h3f-pvr7-cr27

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