---
id: GHSA-896w-cw95-xq7w
title: >-
  Duplicate Advisory: Grav: Path Traversal in MediaUploadTrait::deleteFile()
  Allows Arbitrary File Deletion
summary: >-
  Duplicate Advisory: Grav: Path Traversal in MediaUploadTrait::deleteFile()
  Allows Arbitrary File Deletion
severity: high
cvss: 8.1
cwe:
  - CWE-22
vendor: getgrav
product: getgrav/grav
ecosystem: composer
affected:
  - getgrav/grav < 2.0.16
published: '2026-08-25'
updated: '2026-09-17'
sourceUpdated: '2026-09-17T20:33:41Z'
source: GHSA
sourceUrl: 'https://github.com/advisories/GHSA-896w-cw95-xq7w'
references:
  - url: 'https://github.com/getgrav/grav/security/advisories/GHSA-jq29-c7v8-rg55'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-72695'
  - url: >-
      https://www.vulncheck.com/advisories/grav-before-path-traversal-via-mediauploadtrait-deletefile
  - url: 'https://github.com/advisories/GHSA-896w-cw95-xq7w'
tags:
  - ghsa
  - composer
ingestedAt: '2026-09-17T21:29:16.996Z'
---

## Overview

### Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-jq29-c7v8-rg55. This link is maintained to preserve external references.

### Original 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.

## Affected packages

- `getgrav/grav < 2.0.16`

## Remediation

Refer to the advisory for the patched release.
