Arbitrary file upload in Form plugin for Grav CMS - CVE-2024-27923
Published: March 4, 2024 / Updated: May 20, 2026
Form plugin for Grav CMS
Detailed vulnerability description
The vulnerability allows a remote user to execute arbitrary code.
The vulnerability exists due to improper access control and unrestricted upload of file with dangerous type in the frontmatter form handling feature when creating a page and submitting a crafted contact form. A remote user can add the data[_json][header][form] parameter to enable frontmatter, create a form that saves a .phar file, and submit PHP code to execute arbitrary code.
Exploitation requires an account capable of creating pages.