CVE-2026-72695: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in getgrav grav
Description
Grav before 2.0.16 contains a path traversal vulnerability in MediaUploadTrait::deleteFile() that allows authenticated users with media management permissions to delete arbitrary files by supplying filenames with directory traversal sequences. The method validates only the basename portion of the filename while preserving unvalidated directory paths containing ../ sequences that are passed to unlink(), enabling deletion of files outside the intended media storage directory.
CVSS v4.0
Score 7.1high
Affected software
getgrav
grav
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
Technical Analysis
The vulnerability exists in Grav CMS versions prior to 2.0.16 in the MediaUploadTrait::deleteFile() method. The method validates only the basename of the filename using Utils::checkFilename(), which disallows traversal sequences, but does not validate the directory path portion. As a result, an attacker can supply a filename with '../' sequences in the directory path, which is concatenated and passed to unlink() without proper sanitization. This allows deletion of arbitrary files outside the intended media storage directory. The flaw is reachable by authenticated users with media management permissions via the Flex media handling pipeline. The sibling method renameFile() also lacks proper validation but is currently unused in core.
Potential Impact
An authenticated user with media management permissions can delete arbitrary files on the server, including critical configuration files (e.g., user/config/system.yaml), other users' content files, and authentication-related YAML files. This can cause denial of service by removing essential application files and may enable privilege escalation by deleting security configurations. The vulnerability has a high severity rating (CVSS 7.1 to 8.1 depending on source) due to the potential for integrity and availability impact without requiring UI interaction.
Mitigation Recommendations
No official patch link is provided in the input data. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The suggested fix is to apply Utils::checkFilename() to the full filename parameter, including directory path, or reject any filename containing directory separators or '..' sequences before deletion. Until a patch is available, restrict media management permissions to trusted users only to mitigate risk.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-08-10T13:02:20.828Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a8cf57aacd9273b49842877
Added to database: 08/25/2026, 01:52:58 UTC
Last enriched: 09/18/2026, 01:26:29 UTC
Last updated: 10/08/2026, 18:48:48 UTC
Views: 46
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.