Grav CMS
CVE-2025-66844
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach Grav site with Twig page processing
-
ExploitInject crafted Twig template expression
-
ExecutionTrigger server-side request to internal URL
-
ImpactExfiltrate internal/metadata response
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Credential Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires two specific conditions drawn from the description: (1) page content must be rendered through Twig (Grav's Twig-in-content / Twig page processing must be enabled), and (2) the Grav configuration must permit registration of undefined PHP functions - a non-default hardening setting. Exploitation is therefore limited to instances explicitly configured this way; default Grav installations that do not process page content through Twig or that disallow undefined PHP functions are not exploitable. A further practical limiter is the ability to place or influence the Twig-processed page content, which typically implies some authoring or configuration access despite the PR:N rating. |
| Impact | Signals conflict and should be weighed carefully. The published CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N, 9.1) describes a network-reachable, low-complexity, unauthenticated SSRF with high confidentiality and integrity impact - on paper a critical priority. However, the description constrains exploitation to two non-default preconditions: page content must be processed by Twig, and the configuration must allow undefined PHP functions to be registered. That operator-controlled, non-default configuration requirement sits in tension with the PR:N/AC:L rating, since reaching the Twig-in-page-content path typically presupposes some authoring/configuration privilege - verify the realistic privilege level with the vendor. Corroborating exploitation-likelihood data is modest: EPSS is only 0.29% (20th percentile), there is NO CISA KEV listing, and while publicly available exploit code exists (a GitHub issue PoC), POC availability is a distinct signal from active exploitation and does not indicate in-the-wild use. Net: this is a genuine SSRF worth patching, but the combination of a hardening-dependent precondition, low EPSS, and absence of KEV points to a conditionally-exploitable issue rather than a broadly wormable emergency - real priority for operators running the vulnerable Twig/PHP-function configuration, lower priority for default deployments. |
| Exploit ScenarioDerived | On a Grav instance below 1.7.49.5 configured to allow undefined PHP functions and to process page content through Twig, an attacker who can supply or influence Twig-rendered page content embeds a template expression that drives the server to fetch an attacker-chosen URL, causing the server to issue requests to internal services or metadata endpoints and return their contents. Publicly available exploit code (referenced GitHub issue) demonstrates the SSRF vector. The real-world ease depends on whether the attacker can actually reach the Twig-processed content path without authoring privileges. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
Server-side request forgery (SSRF) in Grav CMS versions prior to 1.7.49.5 allows remote authenticated attackers to make the server issue arbitrary HTTP requests, but only when page content is processed through Twig templates and the configuration permits registration of undefined PHP functions. Public exploit code exists, though EPSS is low (0.29%) and no active exploitation has been confirmed in CISA KEV. The independent assessment notes that signals conflict and should be weighed carefully, rating the vulnerability as CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N, reflecting the significant non-default prerequisites.
RemediationAI
Upgrade to Grav 1.7.49.5 or later, as the description indicates versions prior to 1.7.49.5 are vulnerable; vendor-released patch: Grav 1.7.49.5. If upgrading is not immediately possible, disable Twig processing of page content if not required, and ensure the configuration does not allow registration of undefined PHP functions (e.g., set the appropriate Twig configuration option to false). Restrict content authoring privileges to trusted users to reduce the attack surface. Note that disabling Twig processing may break functionality that relies on Twig templates within pages, and restricting undefined PHP functions may break legitimate Twig templates that require PHP function calls. The exploit reference is at https://github.com/Yohane-Mashiro/grav_cve/issues/2, but no official vendor advisory was provided in the input.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in composer
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 content management system that uses the Twig templating engine to render pages. The vulnerability, classified as CWE-918 (Server-Side Request Forgery), arises because Twig templates can call PHP functions if the configuration allows undefined PHP functions to be registered. When page content is processed through Twig and this non-default configuration is enabled, an attacker who can supply or influence page content can inject Twig syntax that invokes PHP functions capable of making network requests (e.g., file_get_contents, curl_exec), causing the server to connect to arbitrary URLs. Default Grav installations do not process page content through Twig and disallow undefined PHP functions, so exploitation requires explicit misconfiguration. The CPE entry cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:* indicates all versions of Grav are potentially affected, but the description specifically affects releases before 1.7.49.5.
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
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Non-default Twig/PHP-function configuration raises AC to H; the Twig-content injection path realistically needs authoring access (PR:L); SSRF chiefly leaks internal data (C:H) with limited integrity and no availability impact.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
DescriptionCVE.org
In grav <1.7.49.5, a SSRF (Server-Side Request Forgery) vector may be triggered via Twig templates when page content is processed by Twig and the configuration allows undefined PHP functions to be registered
Executive ViewAI
Grav CMS deployments running versions prior to 1.7.49.5 are exposed to a critical SSRF flaw (CVE-2025-66844) that could allow an authenticated attacker to make the server reach internal services or cloud metadata when specific non-default Twig and PHP function registration settings are enabled. Publicly available exploit code exists, but this is an authenticated attack with significant non-default prerequisites, so broad opportunistic compromise is not expected. Leadership should prioritize inventory, access restrictions, and outbound network controls because successful exploitation could expose internal systems and enable lateral movement.
No vendor-released patch identified at time of analysis. Interim mitigations include restricting Grav CMS access to trusted authenticated users, disabling Twig template processing for untrusted page content, disabling registration of undefined PHP functions in Grav/Twig configuration, enforcing outbound network egress allowlisting and blocking access to internal/cloud metadata services, deploying WAF/reverse-proxy SSRF detection, and monitoring logs for anomalous server-side requests.
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
Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.
Affected Products (CPE)CVE.org
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
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
Grav is an open-source, flat-file content management system. Rated high severity (CVSS 8.8), this vulnerability is remot
NVD
CVE.org
EPSS
GitHub
Exploit-DB