BuzzPHP
LightDarkSystem

Grav: Path Traversal in MediaUploadTrait::deleteFile() Allows Arbitrary File Deletion

High severity. Published 17 September 2026. Update getgrav/grav to 2.0.16 or later: composer update getgrav/grav.

Which versions are affected?

PackageAffected versionsFixed in
getgrav/grav (opens in a new tab)<= 2.0.152.0.16

What should you do?

Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:

composer show getgrav/grav
composer audit

Advisory details

SeverityHighCVSS 8.1
Published
Updated
CVECVE-2026-72695 (opens in a new tab)
GHSAGHSA-jq29-c7v8-rg55 (opens in a new tab)
WeaknessCWE-22

What the advisory says

Path Traversal in MediaUploadTrait::deleteFile() Allows Arbitrary File Deletion

Summary

A path traversal vulnerability in MediaUploadTrait::deleteFile() allows an authenticated user with media management permissions to delete arbitrary files on the server. The method validates only the basename portion of the filename using Utils::checkFilename(), while the directory path (which may contain ../ sequences) is preserved and passed unvalidated to unlink(). This enables directory escape from the intended media storage path.

Severity

High (8.1) - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

CWE

CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Details

Source: GHSA-jq29-c7v8-rg55 (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .

Other recent advisories for this package

All Composer security advisories