Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as low-priv page editor
-
DeliveryEnable Twig processing in page frontmatter
-
ExploitInject malicious Twig expressions
-
ExecutionVisit page to render payload
-
ImpactEscalate to super admin or run commands via scheduler API
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2021 - Vulnerable and Outdated Components
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
|
| Exploitation Conditions | Requires an authenticated Grav account with admin panel access and page create/edit permission (admin.pages), such as a publisher or editor role - it is NOT exploitable by anonymous/unauthenticated users. The attacker must be able to enable Twig processing on a page (Advanced -> Process: Twig: true), which is not the default page setting but can be toggled by the page editor themselves. Because the Twig sandbox is not enforced in the page-render context, injected expressions gain full access to backend PHP objects under system/src/Grav/Common, enabling grav.user.update()/save() for privilege escalation and grav.scheduler.addCommand()/save()/run() for RCE. Limiting factor: the editor role must be a real trust boundary in the deployment; on single-admin installs the impact is negligible. For the privilege-escalation path specifically, the attacker must also be logged into the front-end site with the same account. |
| Impact | This is a genuine but access-gated risk. The official CVSS 4.0 vector (AV:N/AC:L/PR:L/UI:N/VC:H/VI:H/VA:H, base 7.4) and the GitHub advisory both confirm exploitation requires an authenticated Grav user who already holds admin panel access with page create/edit rights (admin.pages) - so this is NOT unauthenticated internet-wide RCE. The E:P flag in the vector aligns with the input signal that a full PoC is publicly available (GHSA-858q-77wx-hhx6 contains working privesc and RCE payloads), which raises operational risk for any environment where low-trust editors/publishers exist. EPSS is modest at 0.40% (60th percentile), and there is NO CISA KEV listing, indicating no confirmed mass exploitation - consistent with a vuln that requires prior authenticated foothold rather than one favored by opportunistic scanners. Net: real priority for multi-user Grav deployments that delegate page-editing to semi-trusted users (the flaw lets such a user become super admin and run OS commands), but lower urgency for single-admin installs where the editor already effectively controls the site. The signals are internally consistent - no conflicts to flag - the main caveat is that impact assumes the editor role is a meaningful trust boundary in the target deployment. |
| Exploit ScenarioDerived | A publisher/editor with page-editing rights but no admin privileges logs into the Grav admin panel, creates or edits a page, and enables Twig processing (process: twig: true) in the frontmatter. They inject Twig calling grav.user.update()/save() to flip their own account to super admin, or grav.scheduler.addCommand()/save()/run() to execute arbitrary OS commands, then simply visit the page to trigger rendering. A public PoC with both payloads exists in the GitHub Security Advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Sep 26, 2026
Privilege escalation and authenticated remote code execution in Grav CMS versions prior to 1.8.0-beta.27 let an admin-panel user with page create/edit rights enable Twig processing in page frontmatter and inject expressions that reach the entire backend PHP object graph. Because the Twig sandbox is not enforced in the page-render context, a publisher or editor-level account can call grav.user.update()/save() to promote itself to admin/super-admin, or chain grav.scheduler.addCommand()/save()/run() to execute arbitrary system commands; publicly available exploit code exists, with a working payload published in the GHSA-858q-77wx-hhx6 advisory. The attack is access-gated rather than unauth-remote - it requires a valid authenticated account with admin.pages permission (CVSS vector PR:L), and the privilege-escalation path additionally requires the attacker to be logged into the front-end site with that same account. EPSS is low at 0.40% (60th percentile), consistent with a genuine but niche, insider-adjacent risk rather than mass exploitation.
Earlier versions of this analysis (1)
RemediationAI
Upgrade to Grav 1.8.0-beta.27 or later - vendor-released patch, delivered through the composer/getgrav/grav package - which adds the Twig blocklist hardening in system/src/Grav/Common/Security.php via commit e37259527d9c1deb6200f8967197a9fa587c6458; full details are in advisory GHSA-858q-77wx-hhx6. Because the fix is a deny-list/pattern filter rather than enforced sandboxing, treat any account that can edit page frontmatter as a privileged operator: review users and roles, strip admin.pages from publisher/editor accounts that do not genuinely need it (this breaks normal editorial workflow for those users, so reassign content duties first), and consider revoking the front-end login path for such accounts since the privilege-escalation chain needs a concurrent site session with the same user. As a hardening measure, disallow 'process: twig: true' in page frontmatter by policy or a blueprint/config restriction, and audit existing pages for that flag - the trade-off is loss of in-content Twig templating for legitimate authors. Where the Scheduler API is not needed for business workflows, remove or lock down scheduler jobs/config so the RCE chain's addCommand()/save()/run() sink is unavailable, and where it is needed, alert on unexpected job creation by non-administrators. Restrict admin panel exposure to trusted networks or an SSO/reverse-proxy gate to raise the cost of credential-based initial access. Note the publicly available PoC and low EPSS (0.40%, 60th percentile): prioritize patching where multiple non-admin editors exist or the admin panel is internet-reachable.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause class is CWE-1336, improper neutralization of special elements used in a template engine, i.e. server-side template injection in Twig. Grav is a flat-file PHP CMS whose pages can opt into template evaluation by setting 'process: twig: true' in the page frontmatter (togglable from the admin panel under Advanced), after which the page body is compiled and rendered as a Twig template. In that render context the Twig sandbox/security policy is not applied, so template variables such as {{ grav.* }} expose live Grav service objects under system/src/Grav/Common - the User/Accounts API and the Scheduler API in particular - along with their public methods, giving an attacker object-graph access equivalent to in-process PHP code. The upstream fix in commit e37259527d9c1deb6200f8967197a9fa587c6458 hardens Grav\Common\Security.php by compiling cached regex blocklists that flag dangerous Twig functions (eval, system, exec, file_put_contents, curl_*, ReflectionClass, include/require, unserialize, etc.), dangerous property/method patterns (grav.user.update/save, grav.scheduler.*, config.set, twig.addFilter/Extension, core.setEscaper, _context, locator.findResource with write mode), calls outside Twig blocks used for nested evaluation, and array-index/join concatenation tricks that would reassemble a blocked function name at runtime. Notably this is a deny-list and pattern-matching defense layered on the existing rendering path rather than true sandbox enforcement, which is why deployments should not treat the beta patch as equivalent to isolating untrusted template authors.
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/E:P
Remotely reachable admin panel (AV:N/AC:L); requires an authenticated non-admin page editor (PR:L); attacker triggers by visiting own page so no other-user interaction (UI:N); Twig-to-PHP RCE yields full C/I/A.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
5DescriptionCVE.org
Grav is a file-based Web platform. Prior to 1.8.0-beta.27, a user with admin panel access and permissions to create or edit pages in Grav CMS can enable Twig processing in the page frontmatter. By injecting malicious Twig expressions, the user can escalate their privileges to admin or execute arbitrary system commands via the scheduler API. This results in both Privilege Escalation (PE) and Remote Code Execution (RCE) vulnerabilities. This vulnerability is fixed in 1.8.0-beta.27.
Executive ViewAI
Grav CMS instances running versions prior to 1.8.0-beta.27 are vulnerable to privilege escalation and remote code execution if admin users with page editing permissions are compromised or act maliciously. An attacker exploiting this vulnerability could gain full system control, potentially leading to data theft, service disruption, and compliance violations.
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
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Related Vulnerabilities in Grav CMS Code Injection and Privilege Escalation
View all 13A 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
Remote code execution in Grav CMS before 2.0.13 allows authenticated low-privilege users to plant and execute arbitrary
EUVD-2025-200078
GHSA-858q-77wx-hhx6
NVD
CVE.org
EPSS
VulDB
Exploit-DB