CVE-2026-49970 Laravel-Mediable < 7.0.0 Path Traversal via File::sanitizePath()
Attackers can exploit path traversal in Laravel-Mediable to upload files to sensitive locations, potentially enabling remote code execution.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-49970?
CVE-2026-49970 is a high-severity path traversal vulnerability in plank laravel-mediable, published on 13 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Laravel-Mediable before 7.0.0 contains a path traversal vulnerability in the File::sanitizePath() function that allows attackers to write uploaded files to arbitrary locations by controlling the directory argument passed to MediaUploader::toDestination(). Attackers can exploit the permissive character-class regex that allows both dot and slash characters combined with an ineffective trailing trim() call to bypass sanitization and upload files to sensitive locations such as the document root, environment configuration files, or application configuration directories, enabling remote code execution.
Weakness: CWE-22
Which versions are affected by CVE-2026-49970?
2 open source packages ship an affected version, including plank/laravel-mediable.
| Package | Affected | Fixed in |
|---|---|---|
plank/laravel-mediable Packagist | All versions | 7.0.0 |
plank/laravel-mediable Packagist | All versions | 7.0.0 |
How do I fix CVE-2026-49970?
Upgrade plank/laravel-mediable to 7.0.0 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-49970 being exploited?
There is no known exploitation of CVE-2026-49970 in the wild and no public exploit code.
Sources
Also known as GHSA-xv8g-76mx-2rxc.