Grav
Grav before 1.0.3 Remote Code Execution via File Upload Extension Bypass
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.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS8.8high · scored by CNA · CWE-434
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
getgrav grav
- < 1.0.3
Fixed in 1.0.3
Mitigation
Upgrade grav to 1.0.3 or later.
References
- Vendor advisory github.com/getgrav/grav/security/advisories/GH…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.