# CVE-2026-49970: Laravel-Mediable < 7.0.0 Path Traversal via File::sanitizePath()

- Severity: High 8.7 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.77%, higher than 56% of CVEs (2026-12-01)
- Published: 2026-07-13T18:11:36.832Z
- Modified: 2026-10-24T22:10:00.210Z
- Also known as: GHSA-xv8g-76mx-2rxc
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: VulnCheck

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

(As written by CVE List.)

## Affected

- plank laravel-mediable: before 7.0.0
- plank/laravel-mediable (Packagist): before 7.0.0

## Every score

- VulnCheck: CVSS:4.0 8.7 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- VulnCheck: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/plank/laravel-mediable/releases/tag/7.0.0> (patch, release-notes, web)
- <https://github.com/plank/laravel-mediable/commit/6d1e7fb39922fdfb3b2d120e13f4eb2e653ae082> (patch, web)
- <https://www.vulncheck.com/advisories/laravel-mediable-path-traversal-via-file-sanitizepath> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-49970> (advisory)
- <https://github.com/plank/laravel-mediable/pull/391> (web)
- <https://github.com/plank/laravel-mediable> (package)

## Sources

- CVE List: [CVE-2026-49970](https://www.cve.org/CVERecord?id=CVE-2026-49970), CVE Terms of Use, modified 2026-10-08
- GitHub Advisory Database: [GHSA-xv8g-76mx-2rxc](https://github.com/advisories/GHSA-xv8g-76mx-2rxc), CC-BY-4.0, modified 2026-08-13
- NVD: [CVE-2026-49970](https://nvd.nist.gov/vuln/detail/CVE-2026-49970), Public domain, modified 2026-10-24

---

Page: https://cve.day/CVE-2026-49970 · Whole record: https://cve.day/CVE-2026-49970.json · Rebuilt by cve.day 2026-11-25T22:59:27.839Z
