CVE-2026-137305: Grav Form Plugin before 9.2.4 Code Injection via File Field Upload Destination
Grav Form plugin before 9.2.4 contains a code injection vulnerability that allows page authors to write uploads into Twig template folders by setting an unchecked file field destination in Form::uploadFiles(). Attackers can upload .txt or .svg files containing Twig and have them rendered as trusted templates outside the sandbox, executing code as the web server user.
Affected Software
Event History
Frequently Asked Questions
Who can exploit this issue?
A page author who can set a file field upload destination is the relevant attacker. The attacker must be able to direct uploads into a Twig template folder.
What does an attacker need to upload?
The attacker can use .txt or .svg files containing Twig content. If the uploaded content is rendered as a trusted template outside the sandbox, it can execute as the web server user.
What version should be used to remediate the issue?
Upgrade the Grav Form plugin to version 9.2.4 or later. Versions before 9.2.4 are affected.