llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · getgrav/grav

GHSA-C7QJ-Q265-Q6Q7

Publishers can delete any server file through the image format option and take over the site

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

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versiones1.7.53.7 · 2.2.18
Exposición21 dDesde la divulgación, 31 oct 2026, 4:06 p. m.
Detección18 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 la severidad declarada por GHSA (alta) y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Ponle una regla en tu SIEM y seguimos.Saqué la lupa: aquí hay algo que investigar.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
31 oct 26
18 nov 26
21 nov 26
31 oct 26
6 nov 26
11 nov 26
16 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-C7QJ-Q265-Q6Q7 divulgada
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

The `format` option of Grav's image actions accepts any string and uses it as part of a cache file name, which allows path traversal. A page editor (publisher) with one Markdown image can make Grav delete any file the PHP user can delete. Deleting the files in `user/accounts` puts the site into first-run setup, where an unauthenticated caller can create a super admin through the API plugin. On sites that enable `system.images.url_actions`, which is off by default, an anonymous visitor reaches the same action directly and can read and delete files.

Affected versions

Grav 2.x from 2.0.0 up to and including 2.2.17, and Grav 1.7 up to and including 1.7.53.6 (the option was added in Grav 1.7.4). On 1.7 the exposure that matters is `url_actions` sites (anonymous file read and delete), which are the reason a 1.7 release is part of this advisory.

Details

`ImageMediaTrait::format()` stores whatever string it receives. When the image is saved, the value is passed to `ImageFile::cacheFile()`, where the cache name `{hash}-{prettyName}.{type}` becomes something like `...-pic./../../../user/accounts/admin.yaml`. The cache unlinks that path when it is older than the source, or returns it as the derivative. The only type check runs afterwards. `format` is on the media action allowlist, so Markdown image URLs reach it, and sandboxed Twig does too. It is also in the list of actions that can be driven from the URL, so with `system.images.url_actions: true` an anonymous request reaches it through the media fallback and gets file read or delete.

The reproducer deletes all three account files through anonymous views of the editor's page, then calls `POST /api/v1/auth/setup`, which returns 200 and a new super admin, and that admin reads the configuration. The anonymous `url_actions` route was observed by the scanner and confirmed by reading the code but is not scripted. The other part of the cache name, `setImagePrettyName`, is urlized by the image library and is not affected.

Impact

A publisher deletes any file the PHP user can delete and takes over the site through first-run setup. The default needs a publisher account, which is why the rating is High. Where `url_actions` is enabled the exposure is anonymous and worse.

Patches

Fixed in Grav 2.2.18 and 1.7.53.7. `format()` ignores anything that is not `guess` or a key of the image library's known types (case-insensitively), and `cacheFile()` throws on an unknown type before the cache lookup.

Workarounds

Keep `system.images.url_actions` set to `false` (the default). That closes the anonymous route only; the publisher route has no configuration workaround.

Credits

Discovered by Anthropic's OSS Scanner (ANT-2026-44IYIGNC).

Versiones

Rangos afectados

Afectada Corregida
getgrav/grav< 1.7.53.7
getgrav/grav≥ 2.0.0 < 2.2.18
1.7.53.7
2.0.0
2.2.18
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistgetgrav/grav
Corregida 1.7.53.7, 2.2.18 — —
Versiones corregidas1.7.53.72.2.18
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/getgrav/grav/security/advisories/GHSA-c7qj-q265-q6q7

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