5.3medium
Grav before 1.0.3 Remote Code Execution via File Upload Extension Bypass
- Severity
- 5.3medium CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.61% (higher than 50% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
Description
The Grav API plugin (getgrav/grav-plugin-api) before 1.0.3 contains a file upload extension bypass in the API media controller. HandlesMediaUploads::validateFileExtension() inspects only the final file extension via pathinfo($filename, PATHINFO_EXTENSION), so a user with api.media.write permission can upload a file with a double extension such as shell.php.jpg to bypass the dangerous extensions blocklist. The web server may then execute the file as PHP, resulting in remote code execution.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| getgrav grav | before 1.0.3 Not affected: 1.0.3 | CVE List |
All scores
| VulnCheck | 5.3medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N |
| VulnCheck | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
The Grav API plugin (getgrav/grav-plugin-api) before 1.0.3 contains a file upload extension bypass in the API media controller. HandlesMediaUploads::validateFileExtension() inspects only the final file extension via pathinfo($filename, PATHINFO_EXTENSION), so a user with api.media.write permission can upload a file with a double extension such as shell.php.jpg to bypass the dangerous extensions blocklist. The web server may then execute the file as PHP, resulting in remote code execution.
NVD (es)
El plugin API de Grav (getgrav/grav-plugin-api) anterior a la 1.0.3 contiene un bypass de extensión de carga de archivos en el controlador de medios de la API. HandlesMediaUploads::validateFileExtension() inspecciona solo la extensión de archivo final a través de pathinfo($filename, PATHINFO_EXTENSION), por lo que un usuario con permiso api.media.write puede cargar un archivo con una doble extensión como shell.php.jpg para eludir la lista de bloqueo de extensiones peligrosas. El servidor web puede entonces ejecutar el archivo como PHP, lo que resulta en ejecución remota de código.
References
| https://github.com/getgrav/grav/security/advisories/GHSA-66v2-vxxf-xc3v | exploit, vendor-advisory | |
| https://www.vulncheck.com/advisories/grav-before-remote-code-execution-via-file-upload-extension-bypass | third-party-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-61457 changed 2026-07-28 | CVE Terms of Use |
| NVD | CVE-2026-61457 changed 2026-10-24 | Public domain |