Skip to main content
VulnerabilityPublished Updated

MediaUploadTrait::deleteFile() · Duplicate Advisory: Grav: Path Traversal

Affects getgrav/gravSource GCVE Database

0

CVSS 8.1 High · fixed in 2.0.16 : patch getgrav/grav soon.

Data as of 18 Sep 2026, 01:26 UTC

CVSS 3.1 base score
8.1High
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 2.0.16
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

What to do

Affected software

ProductAffectedFixed in
Packagistgetgrav/gravAffected–Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available in Grav version 2.0.16 and later. Users should upgrade to version 2.0.16 or newer to remediate this vulnerability. No other mitigation guidance is provided in the advisory.

Description

Grav before version 2.0.16 has a path traversal vulnerability in the MediaUploadTrait::deleteFile() function. Authenticated users with media management permissions can exploit this flaw to delete arbitrary files by using directory traversal sequences in filenames. The vulnerability arises because the method only validates the basename of the filename but does not properly sanitize directory paths containing '../' sequences, which are passed to the unlink() function. This allows deletion of files outside the intended media storage directory.

References

Community reviews

Loading reviews…