CVE-2026-72695

Grav before 2.0.16 Path Traversal via MediaUploadTrait deleteFile

Published Aug 25, 2026 CVSS 4.0 · 7.1 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Grav before version 2.0.16 contains a path traversal flaw in the MediaUploadTrait::deleteFile() method that lets authenticated users who have media‑management rights delete any file on the server. The code checks only the basename of the supplied filename, ignoring embedded "../" sequences; when passed to unlink() these sequences enable removal of files outside the designated media directory. The impact is the loss of confidentiality or integrity of arbitrary files, which could undermine site stability or allow an attacker to delete logs or configuration files.

Affected Systems

The affected vendor is getgrav and the product is Grav CMS. All installations of Grav running a version earlier than 2.0.16 are vulnerable, regardless of operating system or deployment environment.

Risk and Exploitability

The CVSS score of 7.1 indicates a high severity risk. EPSS is not available, so the current probability of exploitation is unknown, but the vulnerability is not yet listed in CISA KEV. The attack requires web authentication with media‑management permissions; therefore the attacker must first access the CMS and then provide a crafted filename containing directory traversal characters to trigger the delete.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the Grav update to at least version 2.0.16, which removes the path‑traversal flaw.
  • Limit the set of users granted media‑management permissions so only trusted personnel can delete files.
  • Deploy a secondary input‑validation layer that strips path traversal characters before passing filenames to the deleteFile method.

Generated by OpenCVE AI on August 25, 2026 at 03:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-jq29-c7v8-rg55 Grav: Path Traversal in MediaUploadTrait::deleteFile() Allows Arbitrary File Deletion
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Grav before 2.0.16 Path Traversal via MediaUploadTrait deleteFile
First Time appeared Getgrav
Getgrav grav
Weaknesses CWE-22
CPEs cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*
Vendors & Products Getgrav
Getgrav grav
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H'}

cvssV4_0

{'score': 7.1, 'vector': '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'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 8, 2026, 3:24 PM
Reserved
Aug 10, 2026, 1:02 PM
Status
Deferred
Published
Aug 25, 2026, 2:16 AM
Modified
Oct 12, 2026, 3:10 PM