{"id":"CVE-2026-49970","aliases":["CVE-2026-49970","GHSA-xv8g-76mx-2rxc"],"related":[],"kind":"vulnerability","state":"published","title":"Laravel-Mediable < 7.0.0 Path Traversal via File::sanitizePath()","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-07-13T18:11:36.832Z","modified":"2026-10-24T22:10:00.210Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"7.0.0","status":"affected"}],"vendor":"plank","product":"laravel-mediable","repo":"https://github.com/plank/laravel-mediable","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"7.0.0"}],"ecosystem":"Packagist","package":"plank/laravel-mediable","purl":"pkg:composer/plank/laravel-mediable","source":"ghsa"}],"references":[{"url":"https://github.com/plank/laravel-mediable/releases/tag/7.0.0","tags":["patch","release-notes","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/plank/laravel-mediable/commit/6d1e7fb39922fdfb3b2d120e13f4eb2e653ae082","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/laravel-mediable-path-traversal-via-file-sanitizepath","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49970","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/plank/laravel-mediable/pull/391","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/plank/laravel-mediable","tags":["package"],"sources":["ghsa"]}],"credits":["Xurshidbek Sobirjonov","VulnCheck"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-07-14T13:19:43.970Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-49970","url":"https://www.cve.org/CVERecord?id=CVE-2026-49970","licence":"CVE Terms of Use","modified":"2026-10-08T15:23:03.755Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xv8g-76mx-2rxc","url":"https://github.com/advisories/GHSA-xv8g-76mx-2rxc","licence":"CC-BY-4.0","modified":"2026-08-13T18:51:15.975Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-49970","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49970","licence":"Public domain","modified":"2026-10-24T22:10:00.210Z"}],"updatedAt":"2026-11-25T22:59:27.839Z","epss":{"score":0.00772,"percentile":0.56879,"date":"2026-12-01T12:00:22.000Z"}}