CVE-2026-61457
JSON

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 packageVersionsReported by
getgrav gravbefore 1.0.3
Not affected: 1.0.3
CVE List

All scores

VulnCheck5.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
VulnCheck8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-434

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

Sources

SourceRecordLicence
CVE ListCVE-2026-61457 changed 2026-07-28CVE Terms of Use
NVDCVE-2026-61457 changed 2026-10-24Public domain