CVE-2026-61457 PUBLISHED

Grav before 1.0.3 Remote Code Execution via File Upload Extension Bypass

Assigner: VulnCheck
Reserved: 09.07.2026 Published: 15.07.2026 Updated: 15.07.2026

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.

Metrics

CVSS Vector: 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
CVSS Score: 5.3

Product Status

Vendor getgrav
Product grav
Versions Default: unaffected
  • affected from 0 to 1.0.3 (excl.)
  • Version 1.0.3 is unaffected

Credits

  • alienkeric reporter

References

Problem Types

  • Unrestricted Upload of File with Dangerous Type CWE