Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with low-privilege account
-
ExploitCall mediaDirFunc with traversal path
-
ExecutionResolve path outside media directory
-
ImpactRead and exfiltrate sensitive file
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an authenticated low-privilege session (PR:L) with the ability to reach or influence the mediaDirFunc Twig function exposed by GravExtension.php, then supply a crafted path containing traversal sequences to escape the intended media directory and read arbitrary sensitive files. Applies to Grav CMS versions 2.0.3 through 2.0.6. Limiting factors: exploitation is gated by authentication and by access to template/Twig-rendering functionality (the security.yaml reference at line 325 indicates a function-access control surface), so it is not exploitable by fully unauthenticated users against a default locked-down configuration; impact is confined to confidentiality (file disclosure) with no write or availability effect. |
| Impact | The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N, base 6.5) describes a network-reachable, low-complexity information-disclosure flaw requiring low-level authentication (PR:L) with no user interaction, high confidentiality impact and no integrity/availability impact - consistent with a directory-traversal file read via the GravExtension.php mediaDirFunc Twig method. Exploitation maturity is modest: a public proof-of-concept repository (SLO-CYBER-SEC/CVE-2026-78851) indicates publicly available exploit code exists, but there is no CISA KEV listing and no EPSS score was supplied, so there is no evidence of active or widespread exploitation. There is no SSVC decision data in the input. Net assessment: this is a medium-severity, authentication-gated read primitive - a genuine but bounded risk rather than a drop-everything priority, because the PR:L requirement and MEDIUM base score limit it to attackers who already hold some authenticated foothold. Note a data-confidence caveat: the CVSS vector and description agree on a network/authenticated read, but the CPE and EUVD 'affected versions' fields are populated with 'n/a' placeholders rather than the 2.0.3-2.0.6 range in the description - verify affected-version scope against the vendor. |
| Exploit ScenarioDerived | An attacker holding a low-privileged authenticated account (or any role able to influence Twig template rendering) invokes the mediaDirFunc function with a path containing traversal sequences, causing Grav to resolve a path outside the intended media directory and return the contents of a sensitive file such as a configuration or credential file. A public proof-of-concept exists, lowering the effort required. Because the CVSS vector is AV:N/AC:L, the request is a straightforward remote HTTP interaction with no special timing or complexity. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 15, 2026
Directory traversal in Grav CMS versions 2.0.3 through 2.0.6 allows authenticated remote attackers with low privileges to read arbitrary sensitive files on the server. The flaw exists in the mediaDirFunc Twig method within GravExtension.php, where crafted path sequences can escape the intended media directory. No public exploit has been identified at time of analysis, and the CVSS 3.1 vector (6.5) reflects high confidentiality impact with no integrity or availability effects.
RemediationAI
No vendor-released patch has been identified at time of analysis. Until a patch is available, restrict access to the Twig templating functionality to trusted users only and review the security configuration in system/config/security.yaml (line 325) to ensure the mediaDirFunc is not accessible to low-privilege roles. Apply the principle of least privilege to all authenticated accounts. Monitor the vendor repository at https://github.com/getgrav/grav for a patched release. As a compensating control, consider implementing a web application firewall (WAF) rule to block path traversal sequences (e.g., '../') in requests to media directory endpoints, though this may cause false positives and does not address the root cause. Refer to the VulDB entry at https://vuldb.com/vuln/420719 and the third-party analysis at https://github.com/SLO-CYBER-SEC/CVE-2026-78851 for additional information.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
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 content management system built on PHP that uses the Twig templating engine. The vulnerability is a path traversal (CWE-22) in the mediaDirFunc method defined in system/src/Grav/Common/Twig/Extension/GravExtension.php (line 1629 in version 2.0.6). This Twig function resolves media directory paths for templates, and because user-supplied path components are not properly sanitized, an attacker with access to Twig rendering functionality can inject traversal sequences (e.g., ../) to escape the media directory and read files outside the intended scope. The reference to system/config/security.yaml#L325 indicates a function-access control surface that may limit which roles can invoke the function, but once access is granted, the traversal is possible. The root cause is insufficient validation of path inputs before file system operations, a common flaw in web applications that handle user-controlled file paths. The CPE string provided is generic (cpe:2.3:a:n/a:n/a:*:*:*:*:*:*:*:*), but the affected product is confirmed as Grav CMS through the description and source code references.
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:L/UI:N/S:U/C:H/I:N/A:N
Network-reachable traversal requires a low-privilege authenticated user able to invoke the Twig mediaDirFunc, so PR:L/AC:L; impact is file disclosure only, hence C:H with I:N/A:N.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
Lifecycle Timeline
2DescriptionCVE.org
Directory Traversal vulnerability in Grav CMS 2.0.3 through 2.0.6 allows a remote attacker to obtain sensitive information via the GravExtension.php and the mediaDirFunc method.
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
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
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-102184
GHSA-hjqx-6v9v-mwvj
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB