CVE-2026-49970: Laravel-Mediable Path Traversal Vulnerability
HIGHCVE-2026-49970 is a HIGH (CVSS 8.8) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Laravel-Mediable libraries in the Packagist ecosystem. The issue involves path traversal vulnerability in the file::sanitizepath(). Remediation is available by upgrading affected packages to version 7.0.0.
CVE-2026-49970 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-49970
To remediate this vulnerability, upgrade all affected Laravel-Mediable dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade plank/laravel-mediable to 7.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for plank/laravel-mediable
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-49970, inspect your project dependencies for Laravel-Mediable:
inspect dependencies for plank/laravel-mediable
Analyze the terminal output to locate any version of Laravel-Mediable in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.0.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Laravel-Mediable, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-49970 Affected Laravel-Mediable Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
plank/laravel-mediable
|
Packagist |
< 7.0.0
|
7.0.0
|
References
Frequently Asked Questions
What is CVE-2026-49970?
Which Laravel-Mediable versions are affected?
What version fixes CVE-2026-49970?
Is plank/laravel-mediable affected?
What is the CVSS score of CVE-2026-49970?
What CWE is associated with CVE-2026-49970?
How can I check Packagist dependencies for CVE-2026-49970?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xv8g-76mx-2rxc",
"modified" : "2026-08-13T18:28:50Z",
"published" : "2026-07-13T21:31:24Z",
"aliases" : [ "CVE-2026-49970" ],
"summary" : "Laravel-Mediable: path traversal vulnerability in the File::sanitizePath()",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "plank/laravel-mediable"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-49970"
}, {
"type" : "WEB",
"url" : "https://github.com/plank/laravel-mediable/pull/391"
}, {
"type" : "WEB",
"url" : "https://github.com/plank/laravel-mediable/commit/6d1e7fb39922fdfb3b2d120e13f4eb2e653ae082"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/plank/laravel-mediable"
}, {
"type" : "WEB",
"url" : "https://github.com/plank/laravel-mediable/releases/tag/7.0.0"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/laravel-mediable-path-traversal-via-file-sanitizepath"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-13T18:28:50Z",
"nvd_published_at" : "2026-07-13T19:17:09Z"
}
}