CVE-2026-61457 Grav before 1.0.3 Remote Code Execution via File Upload Extension Bypass
MediumCVSS 5.3
EPSS 0.84%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: total
- Technology
- PHP
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.
Upgrade path
1 package: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| getgrav/grav | < 1.0.3 | 1.0.3 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| getgrav/grav | < 1.0.3 | 1.0.3 |
References
- GitHub Security Advisory (GHSA-66v2-vxxf-xc3v) exploit vendor-advisory
- VulnCheck Advisory: Grav before 1.0.3 Remote Code Execution via File Upload Extension Bypass third-party-advisory