getgrav/grav · Duplicate Advisory: Grav: media_directory() Twig function allows filesystem path traversal and file content disclosure from sandboxed page content
Affects getgrav/gravSource GCVE Database
CVSS 6.5 Medium · fixed in 2.0.16 : update getgrav/grav when convenient.
Data as of 18 Sep 2026, 01:27 UTC
- Patch
- Available – fixed in 2.0.16
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:NWhat to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Packagistgetgrav/grav | Affected– | Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
The vulnerability is fixed in Grav CMS version 2.0.16. Users should upgrade to version 2.0.16 or later to remediate this issue. No other mitigation or temporary workaround is indicated in the provided data.
Description
Grav CMS versions prior to 2.0.16 have a path traversal vulnerability in the media_directory() Twig function. This flaw allows authenticated users with page authoring privileges to supply arbitrary filesystem paths, enabling them to enumerate and read files outside the intended directory scope. The vulnerability arises because the function does not properly validate filesystem paths, permitting access to any file matching configured media extensions accessible by the web server process.