Quick answers
- Is CVE-2026-72697 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-72697 being exploited in the wild.
- How severe is CVE-2026-72697?
- Medium severity, with a CVSS score of 6.5, published 25 August 2026.
- Which products and versions are affected?
- getgrav/grav (Packagist) <= 2.0.15, ECOSYSTEM:introduced=0,fixed=2.0.16.
- Is there a fix for CVE-2026-72697?
- Yes. getgrav/grav (Packagist): upgrade to 2.0.16 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-72697 attacked?
- It is attacked over the network, in a web application.
- Am I affected by CVE-2026-72697?
- Check whether you run getgrav/grav (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- getgrav/grav (Packagist): upgrade to 2.0.16 or later
composer require getgrav/grav:^2.0.16
Technical details
The vulnerability is a path traversal flaw in `GravExtension::mediaDirFunc()` combined with overpermissive sandbox allow-listing. The function checks whether its input is a Grav stream (e.g., `user://`, `theme://`) and resolves it if so, but if the input is a plain filesystem path—the normal documented shape—the check is skipped and the raw path is passed directly to the `Media` class constructor without validation. The `Media` class then enumerates and indexes all files in that directory matching configured media extensions (by default: `txt`, `json`, `xml`, `pdf`, `doc`, `docx`, image formats, and others). A second gap: the `Medium` class's `filepath` accessor—which returns the absolute filesystem path to a file—is included in the Twig sandbox's allow-list despite a code comment explicitly stating it should remain blocked. An attacker with page-authoring privileges can invoke `media_directory('/etc')` or any other path, enumerate files matching media extensions, and read their contents via the `filepath` property. Affected versions include at least 2.0.15; the advisory recommends validating paths with `realpath()` and enforcing containment within an allowed root, or removing `filepath` from the sandbox allow-list.
Affected products
- Getgrav Grav 2.0.15 and likely earlier versions
Identifiers
- CVE-2026-72697
- GHSA-47ch-6w46-6xm7
Timeline
- 2026-09-17: disclosed: Advisory GHSA-47ch-6w46-6xm7 published
- 2026-09-17: kev added: CVE-2026-72697 assigned