CVE-2026-49970
JSON

8.7high

Laravel-Mediable < 7.0.0 Path Traversal via File::sanitizePath()

Severity
8.7high CVSS:4.0 by VulnCheck
Exploit likelihood
0.77% (higher than 56% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck
Also known as
GHSA-xv8g-76mx-2rxc

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.

Affected

Product or packageVersionsReported by
plank laravel-mediablebefore 7.0.0CVE List
plank/laravel-mediable (Packagist)before 7.0.0GitHub Advisory Database

All scores

VulnCheck8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
VulnCheck8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHub8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Classification

CWE-22

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

Laravel-Mediable anterior a la versión 7.0.0 contiene una vulnerabilidad de salto de ruta en la función File::sanitizePath() que permite a los atacantes escribir archivos subidos en ubicaciones arbitrarias al controlar el argumento de directorio pasado a MediaUploader::toDestination(). Los atacantes pueden explotar la expresión regular (regex) permisiva de clase de caracteres que permite caracteres de punto y barra, combinada con una llamada trim() final ineficaz para eludir la sanitización y subir archivos a ubicaciones sensibles como la raíz del documento, archivos de configuración de entorno o directorios de configuración de la aplicación, lo que permite la ejecución remota de código.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-49970 changed 2026-10-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-xv8g-76mx-2rxc changed 2026-08-13CC-BY-4.0
NVDCVE-2026-49970 changed 2026-10-24Public domain