CVE-2026-72697
Received Received - Intake

Path Traversal in Grav CMS via media_directory() Function

Vulnerability report for CVE-2026-72697, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-25

Last updated on: 2026-08-25

Assigner: VulnCheck

Description

Grav CMS before 2.0.16 contains a path traversal vulnerability in the media_directory() Twig function that fails to validate filesystem paths, allowing authenticated users to enumerate and access files outside intended scope. Attackers with page authoring privileges can supply arbitrary filesystem paths to media_directory() and use the allow-listed filepath accessor on Medium objects to read file contents of any file matching configured media extensions that the web server process can access.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-25
Last Modified
2026-08-25
Generated
2026-08-25
AI Q&A
2026-08-25
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
grav cms to 2.0.16 (exc)
getgrav grav to 2.0.16 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-72697 is a path traversal vulnerability in Grav CMS versions before 2.0.16. It affects the media_directory() Twig function, which fails to validate filesystem paths. Authenticated users with page authoring privileges can supply arbitrary paths to access files outside intended scope. The vulnerability allows reading file contents of any file matching configured media extensions that the web server can access.

Detection Guidance

To detect this vulnerability, check Grav CMS versions for 2.0.15 or earlier. Inspect Twig templates and page content for unauthorized use of media_directory() with non-stream paths like filesystem paths. Review server logs for unusual file access patterns or requests containing filepath accessor usage.

Impact Analysis

This vulnerability allows attackers to read arbitrary files on the server filesystem, including sensitive files outside Grav's intended scope. It can expose confidential data, configuration files, or other tenants' files on shared hosting environments. Exploitation requires page authoring privileges but enables significant data leakage.

Compliance Impact

This vulnerability could lead to non-compliance with GDPR and HIPAA by enabling unauthorized access to sensitive personal or health data. GDPR requires protection of personal data, while HIPAA mandates safeguards for protected health information. A breach through this vulnerability may result in legal penalties and reputational damage.

Mitigation Strategies

Immediately upgrade Grav CMS to version 2.0.16 or later. Review and restrict page authoring privileges to trusted users only. Audit Twig templates to remove or validate non-stream paths in media_directory() calls. Monitor file access logs for suspicious activity.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-72697. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart