Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as Grav page editor
-
DeliverySet form file destination to Twig templates folder
-
ExploitUpload .txt/.svg containing Twig payload
-
ExecutionTrigger template rendering
-
PersistExecute code as web server user
-
ImpactRead secrets or create super-admin account
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires a Grav 2.x deployment (on Grav 1.7 page Twig is not sandboxed, so the bug yields nothing new) running Form plugin 9.2.3 or earlier, and an authenticated page editor account able to edit a page's front matter (PR:L) - no media, configuration or admin permission is needed. The editor must set a form file field's upload destination to a folder Twig loads templates from (a theme/plugin 'templates' folder, a theme-registered Twig folder, or system/templates) and upload a .txt or .svg file containing Twig, which is then rendered either by naming it as the form email action's template or by overwriting a template included on page views. Limiting factors: the primary path needs a valid page-editor login and Grav 2.x; the unauthenticated variant is possible only where an administrator has already pointed a form's destination at a Twig-registered folder (e.g. Quark2's grav-logo.svg images folder), which is a non-default precondition. Fix: Form 9.2.4 restricts uploads to under user/ and refuses any destination in a Twig template path. |
| Impact | This is a credible this-week priority rather than an emergency, and the signals are mostly consistent. The input CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N) scores 8.7 and correctly reflects a network-reachable flaw requiring low privileges - specifically a Grav 'page editor' account (PR:L), not an anonymous attacker, in the primary case. Vulnerability reported by VulnCheck with a detailed getgrav GHSA advisory (GHSA-4grx-p93p-25w8) and a confirmed vendor patch (commit 3daa9cb, Form 9.2.4), so mechanism and fix are well documented. No EPSS score and no KEV listing are provided in the input, and no confirmed working exploit code is referenced - only advisory/analysis references exist - so there is no evidence of active or widespread exploitation. The real-world risk is gated by the PR:L prerequisite and by the deployment being Grav 2.x (on Grav 1.7 the advisory states page Twig is unsandboxed, so the bug grants a page editor nothing new). One notable escalation path lowers the bar to anonymous: if an administrator had already pointed a form's file destination at a Twig-registered folder (e.g. Quark2's images folder serving grav-logo.svg), an unauthenticated visitor could trigger it - but that depends on a specific pre-existing misconfiguration, so it is best read as targeted/conditional rather than broadly automatable. Net: a genuine high-severity authenticated-RCE that warrants prompt patching, not a mass-exploitation emergency on current data. |
| Exploit ScenarioDerived | A Grav 2.x page editor edits a page's front matter to set a form file field's upload destination to a theme or plugin 'templates' folder (or system/templates), then submits a .txt or .svg file containing Twig; because the file now sits in a folder Twig loads trusted templates from, rendering it (via the form's email-action template name, or automatically if it replaces a template included on every page view) executes code as the web server user. No confirmed working public exploit code is referenced, though the vendor GHSA advisory describes the mechanism in full detail. The CVSS AV:N/AC:L/PR:L vector matches this low-complexity, authenticated, network-facing path. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 26, 2026
Code injection in the Grav Form plugin (9.2.3 and earlier on Grav 2.x) lets a page editor who can only edit a page's front matter write attacker-controlled files into folders that Twig loads templates from, then have them rendered as trusted templates outside the content sandbox, executing code as the web server user. The destination of a form file field is taken from page front matter and was stored without validation, so a .txt or .svg upload becomes executable template code once it lands in a theme, plugin or system templates folder; the advisory notes an editor needs no media, configuration or admin permissions. Exploitation requires an authenticated page-editor account on a Grav 2.x site (on Grav 1.7 page Twig is already unsandboxed so the bug adds nothing), except in the non-default case where an administrator has pointed a form destination at a Twig-registered folder, which can allow an anonymous visitor to overwrite a template rendered on every page view. No public exploit code has been identified at the time of analysis, but a vendor fix (Form 9.2.4) is available and the issue is rated a this-week priority.
RemediationAI
Vendor-released patch: update the Grav Form plugin to 9.2.4 (fixed in composer/getgrav/grav-plugin-form 9.2.4, commit 3daa9cb66c43b6d472473dcbf0c312c8e66b1769). From 9.2.4 the plugin only stores uploads inside user/ and refuses any destination that resolves into a theme or plugin templates folder or any folder registered in Twig's template paths, so after upgrading, any form whose file-field destination pointed outside user/ or into a Twig folder will start rejecting uploads with a 'Destination not allowed' error and must be repointed at a location such as self@, page@: or user/data/... - the trade-off being that any intentional workflow writing into a theme or plugin folder breaks and needs redesign. Where an immediate upgrade is not possible, the exposure is bounded by the fact that the primary path requires a page-editor account on Grav 2.x, so keeping page-editor accounts to trusted users reduces (but does not eliminate) the risk, and auditing existing form front matter for file-field destinations that resolve into theme, plugin or system templates folders - particularly any form an administrator pointed at the Quark2 images folder, which enables an anonymous overwrite of grav-logo.svg - removes the preconditions; note that Grav 1.7 installations do not gain privilege from this issue and need not treat it as urgent. Advisory: https://github.com/getgrav/grav/security/advisories/GHSA-4grx-p93p-25w8; patch commit: https://github.com/getgrav/grav-plugin-form/commit/3daa9cb66c43b6d472473dcbf0c312c8e66b1769
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The Grav Form plugin's Form::uploadFiles() resolved a form file field's destination value - supplied by whoever edits the page's front matter - and stored the upload there without checking the resolved location. Destinations can be page tokens (self@, page@:), streams such as theme@:/templates, relative paths or absolute paths, and the fix commit shows the resolved path could land anywhere the web server user can write. This is fundamentally a path-traversal / unrestricted-upload weakness (CWE-73 and CWE-434 alongside the primary CWE-94 code injection): filename checks blocked PHP and page-content extensions, but Twig treats every file in a template path as template source regardless of extension, so a .txt or .svg file is valid template code. Two rendering paths were demonstrated: the form's email action takes a template name from the same front matter and renders it via Twig::processTemplate(), so naming the uploaded file triggers execution; and Quark2 includes @images/grav-logo.svg as a template with its images folder registered in Twig's namespace paths, so replacing that file executes on every page view. The 9.2.4 patch adds Form::isAllowedUploadFolder() and uploadFolderAllowed(), which normalize the destination (resolving . and .. and following symlinks via realpath on the deepest existing segment), require it to sit under user/, reject any themes/<name>/.../templates or plugins/<name>/.../templates path, and reject any path matching a registered Twig template path or namespace path. The trigger and vulnerable flows are described in the supplied advisory and commit diff; the exact CVSS 4.0 metric values are severity indicators rather than mechanism.
Know when Grav Plugin Form gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Network-reachable form submission by an authenticated page editor (PR:L) with no user interaction yields code execution as the web server user, giving high C/I/A; same security authority so S:U.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Technical POC Analysis
CWE-94 (Improper Control of Generation of Code), with the advisory additionally tagging CWE-73 (External Control of File Name or Path) and CWE-434 (Unrestricted Upload of Dangerous Type).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
The Grav Form plugin (versions 9.2.3 and earlier on Grav 2.x) contains a high-severity code injection flaw that allows a user with only page-editing permissions to execute arbitrary code on the web server. This means that any editor-level account, or in rare misconfigured cases an anonymous visitor, can compromise the entire website and potentially the underlying server. Leadership should care because this vulnerability enables a low-privileged user to take full control of the site, leading to data breaches, service disruption, or further network compromise.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
More in Grav Plugin Form
View allStored cross-site scripting in the Grav Form plugin (grav-plugin-form 9.1.39 and earlier) lets an anonymous visitor uplo
Open redirect in Grav's form plugin (getgrav/grav-plugin-form) versions 9.1.11 through 9.1.12 allows unauthenticated for
Unauthenticated form action execution in the Grav Form Plugin before 9.1.22 allows anonymous visitors to trigger save, u
EUVD-2026-136049
NVD
CVE.org
EPSS
GitHub
Exploit-DB