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

GHSA-FHG3-XWWR-CQ26

Publishers can run shell commands through a Markdown image URL

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
Parche1 versión2.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.
Si sale un exploit, la subo de categoría. Atento.Las PoC crecen rápido, como las llamas bebé.
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-FHG3-XWWR-CQ26 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

A page editor (publisher) can read any file and run shell commands as the web server user by saving a single Markdown image URL in a page, whenever the page is viewed. It bypasses the media action allowlist introduced after GHSA-ffmg-hfvg-jhg9. On sites where a public form mails its fields through the Email plugin with `process_markdown: true`, the same payload is reachable by an anonymous visitor.

Affected versions

Grav 2.x from 2.0.0 up to and including 2.2.17. The allowlist and the dispatch code that defeats it date from 2.0.0-rc.10. Grav 1.7 has no allowlist at all (any method on the medium can be called from a Markdown image URL), so publisher to code execution has always been open there. Because it is publisher-only, no 1.7 release is part of this advisory. The anonymous `process_markdown` route also exists on 1.7, but only under that non-default setting.

Details

Markdown image URLs can carry media actions (`photo.jpg?resize=100,100`). `Excerpts` gates these with `method_exists($medium, $name)`, so a name that is not a real method of the medium is treated as a harmless URL parameter. A scoped name such as `self::addMetaFile` is not a method name, so it passes the gate as a URL parameter. The dispatch then uses `call_user_func_array([$medium, $name], $args)`, which resolves `self::x`, `parent::x` and `Ancestor::x` to the real method. Each action replaces `$medium` with the previous return value, so a string result makes the next action a static call on any class, for example `Symfony\Component\Process\Process::fromShellCommandline` followed by `run`. `Link::__call()` resolves scoped names the same way, which also reaches the Lightbox Gallery plugin's media actions (see GHSA-jq4h-4q3q-hr32). The gate also runs only once against the original medium, while actions such as `display=thumbnail` and `link` swap `$medium` for an object of another class.

The reproducer shows the editor's page leaking the account hash in a 500 response, and `id` running as `www-data`, both for the editor and with no account through a public contact form that mails its fields through the Email plugin with Markdown processing enabled.

Impact

A publisher gets file read and code execution as the web server user, which means full control of the site and server account. The default needs a publisher account, so the rating is High. Sites that enable `process_markdown` in the Email plugin on a form that anonymous visitors can submit are exposed to anonymous code execution.

Patches

Fixed in Grav 2.2.18. Actions are dispatched with `$medium->{$method}(...$args)`, so scoped names fall through to the magic call and not to the real method. The `$medium` variable only keeps results that are media or link objects. The `Link` class gets the same change, and the allowlist gate is evaluated for each action against whatever the current medium is.

Workarounds

Leave `process_markdown` disabled in the Email plugin (the default), which closes the anonymous route. The publisher route has no configuration workaround.

Credits

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

Versiones

Rangos afectados

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

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistgetgrav/grav
Corregida 2.2.18 — —
Versiones corregidas2.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-fhg3-xwwr-cq26

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