Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain api.pages.write API credential
-
DeliverySubmit crafted Twig payload to translate() endpoint
-
ExploitPersist malicious page with process.twig enabled
-
ExecutionTrigger page render (attacker or victim request)
-
PersistTwig engine evaluates injected directives
-
ImpactExecute arbitrary server-side code
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
|
| Exploitation Conditions | Exploitation requires the attacker to hold a valid credential or API token with the api.pages.write permission in the grav-plugin-api. This is the hard prerequisite - unauthenticated actors cannot exploit this vulnerability. Additionally, the malicious page must be rendered after persistence (either by the attacker triggering a request or by waiting for a victim or crawler to load it), and the page must have the process.twig flag enabled, which the attacker can set during the write operation if the API permits it. Exploitation is limited to Grav installations running grav-plugin-api below 1.0.15 and is not applicable to Grav core without the API plugin. There is no required user interaction beyond the initial write and a subsequent page render. The attack is network-accessible and requires no special timing or race conditions (AT:N). The key limiting factor is the api.pages.write permission gate: deployments that restrict this permission to trusted administrators significantly reduce realistic exploitation risk despite the high CVSS score. |
| Impact | The CVSS 4.0 score of 8.6 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N) reflects a realistic threat model: network-accessible, no attack complexity or timing requirements, but gated behind PR:L because the api.pages.write permission is required. This permission gate is the primary real-world risk moderator - exploitation is limited to users or API tokens that have been granted write access to the Grav API. Deployments that restrict this permission to trusted administrators carry materially lower risk than those where it is granted to contributors or third-party integrations. No EPSS data was provided, and no CISA KEV entry exists, indicating no confirmed active exploitation campaigns at analysis time. No proof-of-concept code has been identified. Despite the high CVSS score, this should be treated as a medium-urgency priority for most deployments: critical only when the api.pages.write permission is granted to semi-trusted or untrusted parties. The absence of an availability impact component (VA:N/SC:N) is notable - while SSTI-driven RCE typically implies full system compromise including availability, the provided vector does not score it, and no contradicting vendor data is available to override this. |
| Exploit ScenarioDerived | An attacker with a valid API token scoped to api.pages.write submits a POST request to the translate() endpoint with a Twig payload such as {{['id']|map('system')|join}} embedded in the content or header parameters, persisting a page with process.twig: true. When any user or automated process subsequently requests the rendered page, the Twig engine evaluates the directive server-side, returning command output or facilitating further exploitation such as web shell deployment. No public proof-of-concept code has been identified, but the technique is well-understood for Twig SSTI and requires minimal attacker sophistication. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 18, 2026
Server-side template injection in grav-plugin-api before 1.0.15 enables remote code execution for any attacker holding api.pages.write permission. The translate() endpoint accepts unsanitized Twig template syntax in header and content parameters, which can be persisted to a page with process.twig enabled and evaluated by the Twig engine at render time. No public exploit or CISA KEV listing has been identified at time of analysis, but the combination of network-reachable exploitation path and high confidentiality and integrity impact from full server-side template evaluation makes this a serious risk for any Grav installation exposing the plugin API to lower-trust users.
RemediationAI
Upgrade grav-plugin-api to version 1.0.15 or later, which is the vendor-confirmed fix version per the GitHub Security Advisory GHSA-w94c-jmg4-w4c9. The advisory is at https://github.com/getgrav/grav/security/advisories/GHSA-w94c-jmg4-w4c9. If immediate upgrade is not possible, restrict or revoke api.pages.write permissions from any user or API token that does not require it - this eliminates the authenticated attack path entirely. As a secondary control, disable or block access to the translate() API endpoint at the network layer (e.g., via web server rules or reverse proxy ACLs) for clients that do not legitimately require it; note this may break API-dependent workflows. A third compensating control is to audit all existing pages for process.twig: true headers and remove that flag where not required, which prevents existing stored payloads from executing at render time even if they were already injected - though this does not prevent future injection after the control 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 CMS is a flat-file PHP content management system that uses the Twig templating engine (getgrav:grav per CPE cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*) for page rendering. The grav-plugin-api component exposes a REST API for programmatic content management. CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine) describes the root cause: user-controlled content is passed into a Twig template context without stripping or sandboxing template directives. The translate() endpoint specifically fails to validate or escape Twig syntax in the header and content parameters. Because Grav supports per-page rendering flags, an attacker who can write a page with process.twig: true will cause the Twig engine to evaluate any embedded directives - including directives that execute PHP code - when that page is subsequently rendered. This is a two-stage stored SSTI: injection happens at write time; execution happens at render time.
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:N/SC:N/SI:N/SA:N
Network-reachable via API, low complexity, requires api.pages.write (PR:L); scope changes as Twig evaluates in server process; no availability impact per vendor vector.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
grav-plugin-api versions before 1.0.15 fail to validate Twig content in the translate() endpoint, allowing attackers with api.pages.write permission to persist pages with process.twig enabled. Attackers can submit crafted header and content parameters to execute server-side template injection payloads that are evaluated at render time.
Executive ViewAI
Grav-plugin-api prior to version 1.0.15 contains a template injection flaw enabling remote code execution for any account with API write permissions. The vulnerability affects all Grav instances exposing the plugin's API, putting sensitive data and system integrity at direct risk of compromise. Immediate action is required to audit permissions, restrict access, and apply available mitigations.
No vendor-released patch identified at time of analysis. Interim mitigations include: disabling Twig template processing via Grav configuration, restricting api.pages.write permissions to internal accounts only, implementing network-level access controls to API endpoints, and deploying WAF rules to filter Twig syntax from the translate() endpoint.
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.
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-60593
GHSA-2jqg-x237-hwx2
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB