Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with api.access and api.pages.write credentials
-
DeliveryCreate or edit page with Twig OS-command payload in header.form.process.email.body
-
ExploitPublish malicious page to activate Email action
-
ExecutionSubmit page form to trigger Email plugin rendering
-
PersistUnsandboxed Twig evaluates payload
-
ImpactExecute arbitrary OS command as PHP process user
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
|
| Exploitation Conditions | Exploitation requires an authenticated session with both api.access and api.pages.write permissions - these are content-editor-level roles, not administrator roles, meaning the privilege bar is intentionally low for many Grav multi-user deployments. The attacker must be able to create or modify a Grav page that includes an Email form action, specifically controlling the header.form.process.email.body parameter in the page frontmatter. The Grav Email plugin must be installed and active on the target instance. The associated form must be submittable - either publicly accessible or submittable by the attacker themselves - to trigger rendering. Exploitation is bounded to Grav Email plugin versions prior to 4.2.2; single-user or admin-only deployments are not realistically at risk from external attackers, though insider threat remains valid. The OS-level impact radius is constrained by the privilege level of the PHP process user. |
| Impact | The CVSS 4.0 score of 8.7 reflects a network-accessible, low-complexity attack with no user interaction required, yielding high confidentiality, integrity, and availability impact on the vulnerable system. The most operationally significant signal is the low privilege threshold: api.access and api.pages.write are content-editor-level permissions routinely granted to non-administrative contributors, dramatically widening the realistic attacker pool beyond admin-only vulnerabilities. SSTI in Twig is a thoroughly documented attack class - exploitation patterns are publicly catalogued and require only moderate attacker skill even absent a specific POC for this CVE. No CISA KEV listing and no confirmed active exploitation reduce urgency somewhat, and the EPSS signal is absent from provided data, so probabilistic exploitation rate cannot be independently assessed. Scope impact (SC:N/SI:N/SA:N in the 4.0 vector) is listed as contained to the vulnerable system, though OS command execution as the PHP process user may reach adjacent resources depending on deployment context - organizations should verify the PHP process user's privilege level and filesystem/network reach. Overall, this should be treated as urgent for any publicly reachable Grav installation with multi-user content editing enabled. |
| Exploit ScenarioDerived | A malicious content editor with api.access and api.pages.write permissions creates a new Grav page and sets header.form.process.email.body to a Twig payload such as {{ ['id'] | map('system') | join }}, then publishes the page. Upon form submission - which the attacker can trigger themselves or socially engineer - the Email plugin renders the body field as an unsandboxed Twig template, executing the OS command as the PHP process user. No public POC has been identified at time of analysis, but standard Twig SSTI exploitation techniques are well-documented and widely available. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 25, 2026
Server-Side Template Injection in the Grav Email plugin (getgrav/grav-plugin-email) before 4.2.2 permits authenticated remote code execution on the host running PHP. Any account holding only api.access and api.pages.write permissions - typical content-editor roles - can embed a Twig payload in the header.form.process.email.body Email action parameter, publish the page, and trigger arbitrary OS command execution by submitting the associated form. No active exploitation has been confirmed by CISA KEV and no public exploit has been identified at time of analysis, but the low privilege bar and well-understood SSTI attack class make this a high-priority remediation target.
RemediationAI
Upgrade the Grav Email plugin to version 4.2.2 or later, which addresses unsandboxed Twig rendering of Email action parameters, as documented in GitHub Security Advisory GHSA-gh8j-q67c-j53f (https://github.com/getgrav/grav/security/advisories/GHSA-gh8j-q67c-j53f). If immediate patching is not feasible, revoke api.pages.write permissions from all non-fully-trusted accounts as a compensating control - this eliminates the ability to craft malicious page headers but does not fix the underlying flaw and may disrupt legitimate editorial workflows. Additionally, consider disabling the Email form action plugin entirely until the patch is applied if form-based email is not business-critical. Do not rely on network perimeter controls alone, as the attack originates from authenticated internal or external users with legitimate portal credentials.
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
CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine) describes the root cause: the Grav Email plugin passes the Email action's body parameter - sourced from page-editor-controlled page headers - directly into Twig's rendering engine without enabling Twig's sandbox extension. Twig's sandbox mode, when properly configured, restricts callable functions and classes; without it, attackers can invoke PHP's system(), shell_exec(), or equivalent functions via Twig filter chains (e.g., {{ ['cmd'] | map('system') }}). The affected CPE is cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:* for all versions prior to 4.2.2 of the plugin. Grav is a flat-file PHP CMS; the Email plugin processes contact and notification forms defined in page frontmatter.
Know when Grav 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-accessible, low-privilege exploitation escaping the web application sandbox to execute OS commands justifies PR:L, S:C, and full C/I/A impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
The Grav Email plugin (getgrav/grav-plugin-email) before 4.2.2 renders page-editor-controlled Email action parameters as unsandboxed Twig templates. An authenticated remote user with only api.access and api.pages.write permissions can place a Twig expression in header.form.process.email.body, publish the page, and submit the form to execute an arbitrary operating-system command as the account running PHP.
Executive ViewAI
The Grav Email plugin (versions before 4.2.2) contains a Server-Side Template Injection vulnerability (CVSS 8.7) allowing authenticated content editor accounts to execute arbitrary operating system commands on production servers. While no public exploit has been identified, the low-privilege attack surface and straightforward exploitation path mean this vulnerability requires immediate containment. Without patching-currently unavailable from the vendor-organizations must implement interim access controls to prevent internal threat escalation through compromised editor accounts.
No vendor-released patch identified at time of analysis. Interim mitigations include: (1) disabling the email plugin if operationally feasible; (2) restricting email plugin configuration to trusted system administrators only; (3) removing api.access and api.pages.write permissions from content editor roles and limiting them to read-only access; (4) implementing network-level controls to monitor and restrict outbound network and OS command execution; (5) deploying Web Application Firewall rules to detect and block Twig template injection patterns in form parameter submissions.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Server-side template injection (SSTI) in Grav (getgrav/grav) prior to 1.8.0-beta.27 allows an authenticated attacker hol
Broken access control in Grav CMS (CWE-285) before 1.8.0-beta.27 lets an authenticated editor-level user escalate their
A Remote Code Execution (RCE) vulnerability in Grav CMS v1.7.48 allows an authenticated admin to upload a malicious plug
Grav is a file-based Web platform. Rated critical severity (CVSS 9.9), this vulnerability is remotely exploitable, low a
GravCMS 1.10.7 allows unauthenticated remote attackers to write arbitrary YAML configuration files, leading to full serv
Remote code execution in Grav CMS 2.0.4 (fixed in 2.0.7) lets an authenticated user holding the admin.pages or api.pages
Remote code execution in Grav CMS before 2.0.15 allows attackers holding page-edit or blueprint-config privileges to wri
Vertical privilege escalation in Grav CMS before 2.0.14 lets a delegated administrator holding only the admin.users perm
Stored cross-site scripting in Grav CMS before 2.0.15 lets authenticated editors smuggle JavaScript event handlers past
Server-side request forgery (SSRF) in Grav CMS versions prior to 1.7.49.5 allows remote authenticated attackers to make
Grav is a file-based Web platform. Prior to 1.8.0-beta.27, Grav CMS is vulnerable to a Server-Side Template Injection (S
Remote code execution in Grav CMS before 2.0.13 allows authenticated low-privilege users to plant and execute arbitrary
EUVD-2026-65217
GHSA-3625-697m-q29v
NVD
CVE.org
EPSS
Exploit-DB