Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain api.pages.write key from super-admin account
-
DeliverySend page-save API request with Twig SSTI payload
-
ExploitguardTwigContent() passes isSuperAdmin() without consulting api_key_scopes
-
ExecutionTwig engine processes payload with process_enabled=true
-
PersistExecute arbitrary server-side code
-
ImpactAchieve full host compromise
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization checks on every request
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Three specific conditions must be simultaneously present for exploitation to succeed. First, the attacker must hold a valid API key explicitly scoped to api.pages.write that was minted against a super-admin Grav account - API keys associated with non-super-admin accounts are not affected because isSuperAdmin() returns false for those accounts, and the scope bypass never triggers. Second, the Grav site must be configured with security.twig_content.process_enabled=true, a non-default setting that enables the Twig templating engine to process expressions embedded in page content; sites that have not enabled this setting cannot reach the RCE execution path. Third, editor_enabled must be set to false in the API plugin configuration. What limits exploitation in practice: the attacker cannot self-issue an API key without prior authenticated access to a super-admin Grav account; the required non-default Twig configuration (process_enabled=true) substantially narrows the exposed population to sites that have deliberately enabled that feature; and the scope bypass specifically requires the key to have been issued on a super-admin account, not merely any authenticated account. |
| Impact | The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H) reflects accurate network accessibility and low-privilege exploitation once a qualifying API key is in hand, though the AT:N designation merits scrutiny: the attack realistically requires two non-default configuration settings (process_enabled=true and editor_enabled=false), which in CVSS 4.0 language would more precisely be AT:P. The EPSS of 0.47% at the 38th percentile is low and likely reflects Grav's moderate deployment footprint combined with the key-holding prerequisite that limits opportunistic mass scanning. However, SSVC's classification of exploitation as automatable with total technical impact substantially overrides the EPSS signal for targeted risk decisions - any attacker who already holds a scoped API key faces no additional barriers to achieving full RCE. No CISA KEV listing is present in the input, so confirmed in-the-wild exploitation is unverified. The combination of a public POC, full-CIA impact, and automated exploitability means this warrants urgent remediation regardless of the low EPSS percentile, particularly for organizations running Grav with the described non-default Twig configuration. |
| Exploit ScenarioDerived | An attacker who has been issued or has otherwise obtained a Grav API key scoped to api.pages.write on a super-admin account sends a crafted HTTP POST to the pages API endpoint, embedding a Twig SSTI payload (such as a reverse-shell template invoking PHP's system() or exec()) in the page content body, targeting a site where security.twig_content.process_enabled=true and editor_enabled=false. The guardTwigContent() function passes the isSuperAdmin() gate because the key's parent account holds super-admin status, and the Twig engine processes the payload server-side, granting the attacker code execution as the web server process user. A public proof-of-concept exists per SSVC intelligence, meaning this attack path is documented and reproducible without advanced capability. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Aug 24, 2026
Server-side template injection (SSTI) leading to remote code execution in the Grav CMS API plugin (getgrav/grav-plugin-api) before version 1.0.13 is reachable by any low-privilege API key holder whose key was minted on a super-admin account. The root flaw is in PagesController::guardTwigContent(), which gates Twig processing via a bare isSuperAdmin() call that ignores the api_key_scopes array, allowing a key deliberately scoped to api.pages.write to enable process.twig on page save despite admin.pages_twig being intentionally excluded from that scope. A public proof-of-concept exists per SSVC data; exploitation is classified as automatable with total technical impact, making this a high-priority patch target for any Grav deployment where the required non-default configuration is active.
Earlier versions of this analysis (1)
Server-side template injection leading to remote code execution affects the Grav API plugin (getgrav/grav-plugin-api) before 1.0.13, where a scope-cap bypass in PagesController::guardTwigContent() lets an API key scoped only to api.pages.write toggle Twig processing that should be gated behind the admin.pages_twig capability. Any holder of such a least-privilege key minted on a super account can enable process.twig on a page save and execute arbitrary Twig server-side. No public exploit has been identified at time of analysis and the issue is not listed in CISA KEV; it was reported by VulnCheck with a vendor security advisory (GHSA-96xv-p87j-58mx).
RemediationAI
The primary fix is to upgrade the Grav API plugin to version 1.0.13 or later, which corrects PagesController::guardTwigContent() to evaluate api_key_scopes rather than relying solely on isSuperAdmin(); the vendor advisory is at https://github.com/getgrav/grav/security/advisories/GHSA-96xv-p87j-58mx. If immediate upgrade is not feasible, set security.twig_content.process_enabled=false in Grav's security configuration to disable server-side Twig processing in content - this directly severs the RCE execution path but will break any site functionality that depends on Twig expressions embedded in page content, so test impact before applying in production. As an additional hardening measure, audit and revoke all API keys scoped to api.pages.write that were minted on super-admin accounts, then re-issue keys from non-super-admin accounts or restrict key issuance to accounts with the minimum necessary privilege level; this reduces the credential surface that the bypass can be exercised through. Setting editor_enabled=true does not constitute a complete mitigation because it is a UI-layer control that does not address the underlying authorization logic flaw.
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 API plugin (CPE: cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*) extends Grav CMS with a REST API for programmatic content management, including page creation and editing. CWE-862 (Missing Authorization) manifests in PagesController::guardTwigContent(), which is responsible for deciding whether Twig templating is permitted in saved page content. The function calls isSuperAdmin() on the authenticated context rather than evaluating the api_key_scopes bound to the API key being used. Because API keys in Grav can be minted with reduced capability sets on super-admin accounts, this design creates an authorization gap: the isSuperAdmin() predicate returns true (the underlying account is privileged) while the key's actual scope excludes the admin.pages_twig capability. When the site is configured with security.twig_content.process_enabled=true and editor_enabled=false, the Twig engine processes user-supplied content server-side, enabling classic SSTI payloads - arbitrary template expressions that invoke PHP functions or spawn system commands - to execute with the web server process's privileges.
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
AC:H reflects the two non-default configuration requirements (process_enabled=true, editor_enabled=false) outside attacker control; PR:L for the required API key credential.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
4DescriptionCVE.org
The Grav API plugin (getgrav/grav-plugin-api) before 1.0.13 contains an API key scope-cap bypass in PagesController::guardTwigContent(). The Twig-toggle check uses a bare isSuperAdmin() gate that does not consult api_key_scopes, so a least-privilege API key scoped only to api.pages.write and minted on a super account can enable process.twig on a page save even though admin.pages_twig is intentionally outside the api.pages scope. When security.twig_content.process_enabled=true and editor_enabled=false, this allows Twig-in-content to execute server-side, resulting in server-side template injection (SSTI) and remote code execution.
Executive ViewAI
Grav CMS API plugin versions before 1.0.13 contain a server-side template injection vulnerability enabling remote code execution; publicly available exploit code exists for this flaw. The vulnerability allows API users with limited permissions to bypass administrative scope restrictions and execute code on the server when non-default API functionality is enabled. Organizations running affected versions face potential system compromise and should prioritize immediate patching.
Apply vendor patch: Grav CMS API plugin version 1.0.13
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
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
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-58638
GHSA-qpvv-mv8x-vg3c
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB