Skip to main content

Grav CMS CVE-2025-66844

CRITICAL
Server-Side Request Forgery (SSRF) (CWE-918)
2025-12-15 cve@mitre.org
9.1
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach Grav site with Twig page processing
  2. Exploit
    Inject crafted Twig template expression
  3. Execution
    Trigger server-side request to internal URL
  4. Impact
    Exfiltrate 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

composer getgrav/grav no fix

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

Vendor (mitre) PRIMARY 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 5.9 MEDIUM

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.

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N
4.0 AV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.3%
Top 80% exploitable
Prevalence
Low
niche developer-oriented flat-file CMS, small production footprint
Exploit
POC
Public exploit code exists
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
CRITICAL severity + public POC available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

66
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

Affected Products (CPE)CVE.org

cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*

More in Grav

View all
CVE-2025-66294 HIGH POC
8.7 Dec 01

Server-side template injection (SSTI) in Grav (getgrav/grav) prior to 1.8.0-beta.27 allows an authenticated attacker hol

CVE-2025-66301 HIGH POC
8.6 Dec 01

Broken access control in Grav CMS (CWE-285) before 1.8.0-beta.27 lets an authenticated editor-level user escalate their

CVE-2025-50286 HIGH POC
8.1 Aug 06

A Remote Code Execution (RCE) vulnerability in Grav CMS v1.7.48 allows an authenticated admin to upload a malicious plug

CVE-2024-34082 CRITICAL POC
9.9 May 15

Grav is a file-based Web platform. Rated critical severity (CVSS 9.9), this vulnerability is remotely exploitable, low a

CVE-2021-47812 CRITICAL POC
9.8 Jan 16

GravCMS 1.10.7 allows unauthenticated remote attackers to write arbitrary YAML configuration files, leading to full serv

CVE-2026-65008 CRITICAL POC
9.3 Jul 21

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

CVE-2026-75827 CRITICAL POC
9.3 Aug 18

Remote code execution in Grav CMS before 2.0.15 allows attackers holding page-edit or blueprint-config privileges to wri

CVE-2026-75837 CRITICAL POC
9.3 Aug 18

Vertical privilege escalation in Grav CMS before 2.0.14 lets a delegated administrator holding only the admin.users perm

CVE-2026-75828 CRITICAL POC
9.3 Aug 18

Stored cross-site scripting in Grav CMS before 2.0.15 lets authenticated editors smuggle JavaScript event handlers past

CVE-2025-66299 HIGH POC
8.8 Dec 01

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

CVE-2026-72819 HIGH POC
8.7 Aug 14

Remote code execution in Grav CMS before 2.0.13 allows authenticated low-privilege users to plant and execute arbitrary

CVE-2024-28119 HIGH POC
8.8 Mar 21

Grav is an open-source, flat-file content management system. Rated high severity (CVSS 8.8), this vulnerability is remot

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy