llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · awcodes/filament-curator

GHSA-3XM3-Q2FJ-X8RQ

SVG sanitization bypass via filename extension, and unvalidated curation paths

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS 3.1
6.5
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche3 versiones3.7.11 · 4.2.1 · 5.3.2
Exposición98 dDesde la divulgación, 14 ago 2026, 12:51 p. m.
Detección96 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
14 ago 26
18 nov 26
21 nov 26
14 ago 26
8 sept 26
2 oct 26
27 oct 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-3XM3-Q2FJ-X8RQ divulgada · CVSS 6.5 (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

Two issues affecting installations that let non-trusted users upload media or crop curations through a Filament panel.

  1. SVG sanitization could be bypassed by renaming the file. Sanitization was gated on the client-supplied filename extension while upload acceptance and the served content type were both decided from the file's contents, so SVG markup uploaded under another name (`payload.txt`) was stored without being sanitized and could later be served as `image/svg+xml`.
  2. The curation modal wrote to a client-supplied path. The crop payload was consumed unvalidated, letting a panel user overwrite files elsewhere inside the storage disk.

Neither issue is exploitable by an unauthenticated visitor. Both require an account that can reach the media library.

Issue 1 — SVG sanitization bypass via filename extension

`Uploader` decided whether to sanitize with `Curator::isSvg($file->getClientOriginalExtension())`. Acceptance, however, is content-based (the `mimetypes:` rule reads the detected type), and `image/svg+xml` is accepted by default. Uploading SVG markup as `payload.txt` therefore passed validation, skipped the sanitizer, and was stored raw with `ext = 'txt'`.

At serving time, `MediaController` streamed non-Glide media with Flysystem's sniffed type. libmagic reports `image/svg+xml` for SVG markup regardless of filename, so the stored payload was returned as `Content-Type: image/svg+xml` with an inline disposition. `X-Content-Type-Options: nosniff` does not help, because the server declares the type itself.

Impact. Script in the payload executes in the application's origin *only* if a victim is induced to open the signed media URL as a top-level document. It does not fire during normal use of the panel: the View action opens the media's direct storage URL, which a web server types from the `.txt` extension, and every in-panel display uses `<img>`, where SVG script does not execute. This is why the rating is Moderate rather than High.

This bypassed the fix shipped in GHSA-8vm9-f75m-5h2m. `curator:sanitize-svgs` did not catch the affected rows either, because it selected on `ext` alone.

Affected code paths. `Components\Forms\Uploader` (all lines) and `CuratorUtils::importMedia` (5.x/4.x), which performed no SVG sanitization at all. The 3.x uploader already gated on the detected type and was never affected on the upload side; only its serving layer was.

*Per-issue score:* `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N` (4.7)

Issue 2 — Unvalidated curation payload

`CuratorCuration::saveCuration()` consumed the client payload without validation:

  • `key` is concatenated into the storage path. Flysystem rejects only traversal that escapes the disk root, so `../../other` still resolves onto a sibling inside it — including the source media the curation was cropped from.
  • `format` selected the image encoder unchecked.
  • `canvasData.naturalWidth` / `naturalHeight` were used as divisors with no zero guard, so a crafted payload raised an unhandled error.

Writes are confined to the storage disk and the content must be something the image encoder can produce, so this is a file-overwrite and integrity issue rather than a path to code execution.

*Per-issue score:* `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N` (6.5) — used as the advisory score, as the higher of the two.

Patches

Upgrade to 5.3.2, 4.2.1, or 3.7.11.

The fix is layered, so a spoofed filename cannot route around it and pre-existing rows are neutralised without a migration:

  • Sanitization now runs when either the extension or the detected type says SVG, in both the uploader and the import helper.
  • The serving layer pins `Content-Type` from the stored extension rather than the sniffed bytes, and forces a download when the extension is unknown and the sniff would render as a document.
  • `curator:sanitize-svgs` now selects on the detected type as well as the extension.
  • The curation payload is validated before anything is written.

Remediation for existing media

After upgrading, re-scan stored media:

php artisan curator:sanitize-svgs --dry-run   # report only
php artisan curator:sanitize-svgs

This rewrites SVG content in place, including rows stored under a non-`.svg` extension. The serving-layer change already prevents those rows from being rendered as documents, so the scan is cleanup rather than the primary fix.

3.x users: this command previously looped indefinitely on libraries with more than 100 SVG records and never completed. That is fixed in 3.7.11, so a scan that appeared to hang on an earlier version should be re-run.

Workarounds

Without upgrading:

  • Remove `image/svg+xml` from the accepted file types, per field with `->acceptedFileTypes()` or globally with `Curator::acceptedFileTypes()`.
  • Restrict media upload and curation permissions to trusted users.

Credit

Reported privately by Afsana Alijabarova (@afa114 https://github.com/afa114), who also supplied reproduction steps, patch suggestions, and a corrected severity assessment for Issue 1 before we had begun triage.

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:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:N
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
awcodes/filament-curator≥ 3.0.0 < 3.7.11
awcodes/filament-curator≥ 4.0.0 < 4.2.1
awcodes/filament-curator≥ 5.0.0 < 5.3.2
3.0.0
3.7.11
4.0.0
4.2.1
5.0.0
5.3.2
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistawcodes/filament-curator
Corregida 3.7.11, 4.2.1, 5.3.2 — —
Versiones corregidas3.7.114.2.15.3.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/awcodes/filament-curator/security/advisories/GHSA-3xm3-q2fj-x8rq

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