Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain super-admin api.config.write API key
-
DeliveryPOST crafted allowlist append request
-
ExploitBypass isSuperAdmin() scope check
-
ExecutionPersist attacker token to twig_sandbox allowlist
-
PersistTrigger Twig render of attacker-influenced content
-
ImpactExecute arbitrary PHP on server
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 | Exploitation requires a valid API key bearing api.config.write scope that was explicitly minted on a super-admin account - a key issued to a non-super account is insufficient because isSuperAdmin() will return false. The POST /reports/twig-content/allowlist endpoint must be network-reachable (no firewall blocking the API port). Converting the allowlist write into RCE requires a second step: a Twig render of attacker-controlled or attacker-influenced content must occur after the allowlist is widened, either via direct content editing access or by inducing another user to trigger a render. Exploitation is bounded by: the requirement for a super-admin-minted api.config.write API key (non-default, requires administrative issuance); the two-step nature of the attack (allowlist write then render); and the absence of a confirmed public exploit or automated scanner at time of analysis. |
| Impact | The reported CVSS 4.0 score of 7.2 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:H/VA:L) captures only the immediate allowlist-write impact and understates the realistic risk ceiling: successful allowlist widening converts all subsequent Twig renders on the instance into SSTI/RCE sinks, which should elevate confidentiality and availability impacts substantially. PR:L is accurate and represents the primary risk-limiting factor - exploitation requires a valid api.config.write-scoped API key that was specifically minted on a super-admin account, a non-default and non-trivial prerequisite that meaningfully narrows the exploitable population. EPSS data was not provided, preventing quantitative exploitation probability assessment. No CISA KEV listing and no confirmed public POC reduce immediate urgency, though the attack primitive (allowlist poisoning → SSTI → RCE) requires no novel techniques. Defenders should treat any externally accessible Grav API instance running the plugin below 1.0.13 where super-admin API keys with config.write scope exist as at material risk of full server compromise through the two-step chain. |
| Exploit ScenarioDerived | An attacker who possesses or has socially engineered a least-privilege api.config.write API key issued on a super-admin Grav account sends a crafted POST /reports/twig-content/allowlist request, appending a permissive Twig tag (such as an unrestricted PHP filter) to the sandbox allowlist persisted in user/config/security.yaml. In a subsequent step - either by editing Grav content directly or by inducing a content editor to render attacker-influenced material - the attacker embeds a Twig SSTI payload exploiting the newly permitted tag, achieving arbitrary PHP execution on the server. No public POC has been confirmed at time of analysis, though the allowlist-widen-then-SSTI chain is well-documented in Grav CMS security research. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 14, 2026
Scope-cap bypass in grav-plugin-api before 1.0.13 allows a holder of a least-privilege api.config.write API key issued on a super-admin account to append arbitrary tokens to Grav's Twig sandbox allowlist (persisted to user/config/security.yaml) via the POST /reports/twig-content/allowlist endpoint. Widening the allowlist eliminates the Twig sandbox boundary, converting any subsequent content render into a server-side template injection (SSTI) sink and ultimately enabling remote code execution on the host. No public exploit has been confirmed and the CVE does not appear in CISA KEV at time of analysis, but the two-step primitive - allowlist poisoning followed by SSTI/RCE - is a well-understood attack class in CMS security research.
RemediationAI
Upgrade grav-plugin-api to version 1.0.13 or later, which corrects the ReportsController to call requireSuper() in place of the bare isSuperAdmin(), ensuring API key scope restrictions are properly consulted. The patch is documented in the GitHub Security Advisory GHSA-v5ph-7v92-wqm6 (https://github.com/getgrav/grav/security/advisories/GHSA-v5ph-7v92-wqm6) and the VulnCheck advisory at https://www.vulncheck.com/advisories/grav-before-api-key-scope-cap-bypass-via-reportscontroller. If immediate patching is not possible, block POST requests to the /reports/twig-content/allowlist path at the reverse proxy or web server layer - note this disables the twig-content allowlist management feature entirely as a side effect. Additionally, audit user/config/security.yaml for unexpected entries in twig_sandbox to detect any prior exploitation, and rotate or revoke api.config.write-scoped API keys on super-admin accounts until the patch is applied.
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
Grav is a flat-file PHP CMS that uses the Twig templating engine for content rendering. The grav-plugin-api plugin exposes a REST API for administrative operations, enforcing access through an API key scope model. The ReportsController's POST /reports/twig-content/allowlist endpoint is intended to be gated behind super-admin authority; the correct implementation would call requireSuper(), which validates both the account-level super flag and the API key's own api_key_scopes. Instead, the vulnerable code calls the bare isSuperAdmin() helper, which reads only access.api.super from the account record and never intersects that with the key's scoped permissions. This is a CWE-862 (Missing Authorization) defect: an authorization check is present but structurally incomplete, creating a logic gap exploitable by a key whose account is super-admin but whose own scope is deliberately restricted to api.config.write. The Twig sandbox allowlist in security.twig_sandbox (user/config/security.yaml) controls which PHP functions, filters, and tags are accessible during template rendering; appending attacker-chosen entries removes sandbox restrictions and makes any Twig render point an SSTI/RCE vector. The CPE cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:* references Grav core rather than the plugin package specifically, suggesting a CPE data gap - the actual vulnerable artifact is the grav-plugin-api plugin.
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:L/VI:H/VA:L/SC:N/SI:N/SA:N
PR:L for required API key; S:C because allowlist write enables SSTI/RCE beyond the plugin's own trust boundary, elevating all three impact metrics to High.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
The getgrav/grav-plugin-api plugin before 1.0.13 contains an API-key scope cap bypass in the POST /reports/twig-content/allowlist endpoint (ReportsController). The endpoint enforces requirePermission('api.config.write') followed by a bare isSuperAdmin() check instead of requireSuper(). Because isSuperAdmin() reads access.api.super directly and never consults api_key_scopes, a least-privilege API key scoped to api.config.write minted on a super account passes the gate, allowing an attacker to append attacker-chosen tokens to the security.twig_sandbox allowlist (persisted to user/config/security.yaml). Widening the allowlist turns any subsequent Twig-in-content render into an SSTI/RCE sink.
Executive ViewAI
A vulnerability in Grav CMS plugin-api allows users with limited API write permissions to manipulate security controls and execute remote code on affected servers. Organizations deploying Grav CMS with distributed API keys face risk of account takeover and system compromise through a two-step privilege escalation attack. No public exploit and no vendor patch identified at time of analysis, but the attack pattern represents a known CMS security threat requiring immediate access controls.
Restrict api.config.write permissions to essential administrator accounts only, with documented justification for each key holder; deploy Web Application Firewall rules blocking suspicious POST requests to /reports/twig-content/allowlist endpoint; enable audit logging on all API calls and security configuration file modifications; limit Twig template rendering to pre-approved content sources; require multi-factor authentication for all accounts capable of API key creation or modification; implement network segmentation to contain blast radius in case of compromise.
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.
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-58639
GHSA-rv98-5gw8-6hf9
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB