# CVE-2026-49970: Plank Laravel-Mediable path traversal in File::sanitizePath

Source: https://junglewise.ai/threats/cve-2026-49970-plank-laravel-mediable-path-traversal-in-file-sanitizepath  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-13. Updated: 2026-09-24  
License: CC BY 4.0 with a link back

CVE-2026-49970 · Severity: high · CVSS 8.8 · Published 2026-07-13

Laravel-Mediable is a popular library for managing file uploads in Laravel applications. A path traversal vulnerability in the File::sanitizePath() function allows authenticated users to upload files to arbitrary locations on the server, potentially writing PHP files to sensitive directories and achieving remote code execution.

Technologies: [Plank Laravel-Mediable](https://junglewise.ai/threats/technologies/laravel-mediable), [Plank Mediable](https://junglewise.ai/threats/technologies/mediable). Vendors: [Packagist](https://junglewise.ai/threats/vendors/packagist), [Plank](https://junglewise.ai/threats/vendors/plank).

## Quick answers

**Is CVE-2026-49970 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-49970 being exploited in the wild.

**How severe is CVE-2026-49970?** High severity, with a CVSS score of 8.8, published 13 July 2026.

**Which products and versions are affected?** plank/laravel-mediable (Packagist) < 7.0.0, ECOSYSTEM:introduced=0,fixed=7.0.0; Plank Laravel-Mediable < 7.0.0; Plank Mediable before 7.0.0.

**Is there a fix for CVE-2026-49970?** Yes. plank/laravel-mediable (Packagist): upgrade to 7.0.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-49970 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-49970?** Check whether you run plank/laravel-mediable (Packagist), Plank Laravel-Mediable or Plank Mediable at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- plank/laravel-mediable (Packagist): upgrade to 7.0.0 or later

  ```sh
  composer require plank/laravel-mediable:^7.0.0
  ```


## Technical details

This is a path traversal vulnerability (CWE-22) in the File::sanitizePath() function within Laravel-Mediable versions before 7.0.0. The vulnerability stems from an insufficiently restrictive regex pattern in the sanitization logic that permits both dot (.) and forward slash (/) characters, combined with an ineffective trailing trim() operation. This allows an attacker who has authentication privileges and can control the directory argument passed to MediaUploader::toDestination() to bypass path sanitization. An authenticated attacker can exploit this to write uploaded files to sensitive locations including the application root, configuration directories containing environment variables, or other writable directories, leading to remote code execution if PHP files are uploaded. The patch is available in version 7.0.0 and later.

## Affected products

- Plank Laravel-Mediable before 7.0.0

## Identifiers

- CVE-2026-49970
- GHSA-xv8g-76mx-2rxc

## Timeline

- 2026-07-13: disclosed
- 2026-07-13: patched: Version 7.0.0 includes the fix

## References

- [https://api.github.com/users/0x00-sys](https://api.github.com/users/0x00-sys)
- [https://github.com/0x00-sys](https://github.com/0x00-sys)
- [https://api.github.com/users/0x00-sys/gists%7B/gist_id%7D](https://api.github.com/users/0x00-sys/gists%7B/gist_id%7D)
- [https://api.github.com/users/0x00-sys/repos](https://api.github.com/users/0x00-sys/repos)
- [https://avatars.githubusercontent.com/u/71561164?v=4](https://avatars.githubusercontent.com/u/71561164?v=4)
- [https://api.github.com/users/0x00-sys/events%7B/privacy%7D](https://api.github.com/users/0x00-sys/events%7B/privacy%7D)

## Related threats

- [Laravel-Mediable incomplete patch for file upload RCE](https://junglewise.ai/threats/cve-2026-93352-laravel-mediable-7-0-0-before-7-0-2-contains-an-incomplete-patch)
- [Plank Laravel-Mediable remote code execution via double extension bypass](https://junglewise.ai/threats/cve-2026-49972-plank-laravel-mediable-remote-code-execution-via-double-extension)
- [Plank Laravel-Mediable stored XSS via SVG file upload](https://junglewise.ai/threats/cve-2026-49971-plank-laravel-mediable-stored-xss-via-svg-file-upload)
- [Plank Laravel-Mediable SSRF in MediaUploader](https://junglewise.ai/threats/cve-2026-49969-plank-laravel-mediable-ssrf-in-mediauploader)
- [Plank laravel-mediable arbitrary file upload in file handling](https://junglewise.ai/threats/cve-2026-4809-plank-laravel-mediable-arbitrary-file-upload-in-file-handling)
