Skip to main content

Laravel-Mediable CVE-2026-49970

HIGH
Path Traversal (CWE-22)
2026-07-13 VulnCheck GHSA-xv8g-76mx-2rxc
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to upload feature
  2. Delivery
    Submit upload with '../' directory argument
  3. Exploit
    Bypass sanitizePath regex/trim
  4. Execution
    Write PHP file to web root
  5. Persist
    Request planted file
  6. Impact
    Execute arbitrary code

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the host Laravel application allows the attacker to influence the directory argument passed to MediaUploader::toDestination() - the specific vulnerable sink - while running a Laravel-Mediable version before 7.0.0. The attacker must have at least low-level privileges (PR:L) sufficient to reach an upload workflow, and needs a writable, web-accessible or config-sensitive target path for the file write to yield code execution. What limits exploitation: applications that hardcode destination directories or sanitize path input before calling the uploader are not exploitable, the process must have write permission to a sensitive location (document root, .env, or config directory), and the account must be able to invoke the upload feature; there is no user-interaction requirement (UI:N), so any qualifying authenticated request suffices.

Impact

The CVSS 4.0 base score is 8.7 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H), indicating a network-reachable, low-complexity attack that requires some privilege (PR:L) and no user interaction, with high confidentiality, integrity, and availability impact - consistent with arbitrary file write escalating to RCE. There is no EPSS score, KEV listing, or public PoC in the provided data, so exploitation is not confirmed in the wild; the RCE and Path Traversal tags plus VulnCheck attribution reflect assessed potential, not observed attacks. A meaningful caveat: the PR:L rating and the description's framing ('by controlling the directory argument passed to MediaUploader::toDestination()') imply the attacker must be able to influence the destination directory - realistic only in applications that pass user-controlled input into that argument, so real-world risk depends heavily on how the host application wires up the uploader rather than on the library alone. Given a confirmed patch and RCE potential, this is a genuine priority for any Laravel app using this package with user-influenced upload paths, but the absence of EPSS/KEV suggests it is not yet mass-exploited.

Exploit ScenarioDerived

In a Laravel app that lets users pick or supply an upload destination folder, an attacker submits an upload whose directory argument contains '../' sequences (e.g. traversing to the public web root) and writes a .php file, then requests that file to execute arbitrary code. Because the attack is network-based with low complexity and no user interaction, it can be automated once the vulnerable upload endpoint is identified. No public PoC is referenced, but the arbitrary-file-write-to-RCE pattern is well understood.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.8% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 13, 2026

Arbitrary file write in the Plank Laravel-Mediable package (before 7.0.0) lets an attacker who influences the destination directory of MediaUploader::toDestination() plant uploaded files outside the intended storage path, culminating in remote code execution. The flaw stems from a weak File::sanitizePath() regex that permits both '.' and '/' characters plus an ineffective trailing trim(), so '../' traversal sequences survive sanitization and files can land in the document root, .env, or config directories. No public exploit has been identified at time of analysis, but a vendor patch (7.0.0) exists and the issue was reported by VulnCheck.

RemediationAI

Vendor-released patch: 7.0.0 - upgrade the plank/laravel-mediable dependency to 7.0.0 or later (composer require plank/laravel-mediable:^7.0), which strips '.' characters from path segments in directory validation and closes the traversal (fix commit 6d1e7fb39922fdfb3b2d120e13f4eb2e653ae082, release notes at https://github.com/plank/laravel-mediable/releases/tag/7.0.0). Where an immediate upgrade is not possible, the effective compensating control is to stop passing user-controlled input into the directory argument of MediaUploader::toDestination(): hardcode or server-side-map destination directories, and reject any directory value containing '.', '/', or '\' before it reaches the uploader - the trade-off is loss of any legitimate feature that lets users choose upload subfolders. Additionally, run the PHP/web-server process under a least-privileged user without write access to the document root, .env, or config directories so a residual traversal cannot land executable or config files. Note that 7.0.0 is a broader security release also addressing SSRF (CVE-2026-49969) and SVG stored XSS (CVE-2026-49971), so upgrading is preferable to point mitigations.

Affected Packages

composer plank/laravel-mediable fix: 7.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in composer

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Laravel-Mediable is a PHP/Composer library (cpe:2.3:a:plank:laravel-mediable) that adds polymorphic media attachment and file-upload handling to Laravel applications. The vulnerability is a classic CWE-22 Improper Limitation of a Pathname to a Restricted Directory: the File::sanitizePath() helper used by MediaUploader::toDestination() relies on a permissive character-class regex that whitelists dot and slash characters and then only trims trailing separators, rather than canonicalizing the path or stripping interior '.' segments. Because the directory argument is treated as attacker-influenceable, traversal tokens such as '../' pass through, allowing writes anywhere the PHP process has permission. The 7.0.0 fix changes directory validation to strip '.' characters from each path segment, neutralizing '../' patterns.

Know when Laravel Mediable gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 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
vuln.today AI 8.8 HIGH

Network-reachable low-complexity upload sink requires an authenticated actor able to influence the directory argument (PR:L), and arbitrary file write to RCE yields full C/I/A impact.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

CVE-2026-49970 is a remote code execution vulnerability in Plank Laravel-Mediable versions before 7.0.0 that enables arbitrary file write through path traversal, allowing attackers to plant code in web-accessible directories. Organizations using this open-source package face direct server compromise risk and potential data exfiltration. Immediate patching to version 7.0.0 is required to prevent application takeover and lateral network movement.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.8%
Top 49% exploitable
Prevalence
Low
niche Laravel media-handling Composer package, limited to PHP/Laravel apps
Threat Intel
1
1 sources
Social Media
3
Sightings
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA CIRCL GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.8%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

45
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)CVE.org

cpe:2.3:a:plank:laravel-mediable:*:*:*:*:*:*:*:*

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy