Skip to main content
EPSS 0.5%top 62%

CVE-2026-72697: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in getgrav grav

0
High
Published: 08/25/2026 (08/25/2026, 01:30:18 UTC)
Source: CVE Database V5
Vendor/Project: getgrav
Product: grav

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 v4.0

Score 7.1high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Affected software

getgrav

grav

Affected versions
>=0 <2.0.16
GitHub Actionsmore threats →ai
getgrav/grav
pkg:github/getgrav/grav
Affected versions
<2.0.16

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/18/2026, 01:27:30 UTC

Technical Analysis

The media_directory() Twig function in Grav CMS (getgrav/grav) is allow-listed for sandboxed page content but improperly validates its input. When given a plain filesystem path (not a Grav stream), it bypasses containment checks and passes the raw path to the Media constructor, which enumerates files with configured media extensions in that directory. The sandbox allow-list erroneously permits the Medium class's 'filepath' accessor, exposing absolute file paths and enabling reading of file contents. This combination allows an attacker who can inject Twig-processed page content to list and read arbitrary files accessible to the web server. The vulnerability is confirmed in Grav CMS version 2.0.15 and earlier, fixed in 2.0.16.

Potential Impact

An attacker with the ability to inject Twig-processed page content can enumerate and read files with certain media extensions anywhere on the filesystem that the web server process can access. This can lead to unauthorized disclosure of sensitive files such as configuration files, documents, and other data matching the media types recognized by Grav. The vulnerability does not require user interaction and does not involve privilege escalation beyond the web server's permissions.

Mitigation Recommendations

A fix is available in Grav CMS version 2.0.16 that addresses this issue. Users should upgrade to version 2.0.16 or later. Until upgraded, avoid allowing untrusted users to inject Twig-processed content or use sandboxed functions that expose filesystem paths. Review and restrict sandbox allow-lists to ensure that sensitive methods like 'filepath' are not accessible.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-08-10T13:02:20.829Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6a8cf57aacd9273b4984287b

Added to database: 08/25/2026, 01:52:58 UTC

Last enriched: 09/18/2026, 01:27:30 UTC

Last updated: 10/08/2026, 18:48:48 UTC

Views: 48

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses