Skip to main content
← All vulnerabilities
CVE-2026-61457

Grav before 1.0.3 Remote Code Execution via File Upload Extension Bypass

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.0.3
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: total

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: total

  3. Record last updated

Affected versions

  • getgrav grav

    fixed in 1.0.3

References 2

GitHub · getgrav/grav

vulncheck.com