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.
Published: 2026-07-13
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Laravel‑Mediable prior to version 7.0.0 contains a path traversal flaw in the File::sanitizePath() method that fails to strip dot and slash characters from the supplied directory path. When an attacker supplies a crafted directory argument to MediaUploader::toDestination() and uploads a file, the sanitized path is bypassed, enabling the file to be written to any directory within the web root or configuration tree. This arbitrary file write permits an attacker to modify critical files such as environment configuration or application configuration files, leading to the ability to execute code on the server and compromise confidentiality, integrity, and availability.

Affected Systems

The vulnerability affects all installations of the plank:laravel-mediable package that are older than version 7.0.0. No other vendors or product versions are listed as impacted.

Risk and Exploitability

The CVSS score of 8.7 classifies this as a High severity vulnerability. The EPSS score is reported as less than 1 %, suggesting a low likelihood of current exploitation. The issue is not listed in the CISA KEV catalog. Attackers can exploit the flaw via a web request or API call that includes a specially crafted directory parameter to MediaUploader::toDestination(); the application must accept the upload request for exploitation to succeed.

Generated by OpenCVE AI on July 31, 2026 at 11:26 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Laravel‑Mediable to version 7.0.0 or later to remove the insecure sanitizePath logic.
  • Limit the directory argument used by MediaUploader::toDestination() to a predefined safe uploads directory to prevent traversal.
  • Enforce strict filesystem permissions on the upload directory so that only the application process can write files, and avoid giving write permissions to directories containing critical configuration or public files.

Generated by OpenCVE AI on July 31, 2026 at 11:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 14 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 13 Jul 2026 19:45:00 +0000

Type Values Removed Values Added
First Time appeared Plank
Plank laravel-mediable
Vendors & Products Plank
Plank laravel-mediable

Mon, 13 Jul 2026 18:30:00 +0000

Type Values Removed Values Added
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.
Title Laravel-Mediable < 7.0.0 Path Traversal via File::sanitizePath()
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.7, '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'}


Subscriptions

Plank Laravel-mediable
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-14T21:33:32.071Z

Reserved: 2026-06-02T16:30:15.234Z

Link: CVE-2026-49970

cve-icon Vulnrichment

Updated: 2026-07-14T13:19:50.264Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T11:30:05Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')