Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to Laravel application
-
DeliverySubmit crafted path traversal as export destination
-
Exploitrealpath() resolves path to existing web-accessible PHP file
-
ExecutionDisk::copy() opens file with fopen(rb+) and overwrites via stream_copy_to_stream()
-
PersistPHP file now contains export content with injected payload
-
ImpactRequest overwrote PHP file to execute arbitrary PHP 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 all three of the following conditions simultaneously: (1) the application exposes a code path where attacker-controlled input reaches the |
| Impact | The CVSS 7.5 vector (AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H) captures the threat accurately: high complexity (AC:H) reflects the precondition that an existing writable file must reside at the resolved path; low privileges (PR:L) reflect that an authenticated application user must control the export destination parameter. No EPSS score or CISA KEV listing appears in the input data, and no standalone POC is confirmed - exploitation probability is therefore unquantified but the commit diff makes the vulnerability straightforward to reproduce for a skilled attacker. The RCE path is realistic only when PHP files are writable by the web server process and the application surfaces the export path as user input, conditions that are common in poorly hardened deployments. Even a mid-sized municipal IT team in mielec running a Laravel SaaS application where export paths flow through user-submitted form fields should treat this as urgent, since the exploitation chain from path traversal to code execution is direct and the fix is a one-line removal. The C:H and A:H ratings are indirect (achieved through overwriting PHP files leading to RCE), not through direct data exfiltration, but they are well-supported once the I:H condition is met. |
| Exploit ScenarioDerived | An authenticated user submits a crafted export path such as |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 01, 2026
Path traversal in Laravel Excel (versions 3.1.8-3.1.69) allows authenticated low-privilege users to overwrite arbitrary existing files on the server by supplying a crafted destination path to Excel::store(), $export->store(), or storeExcel(). The vulnerable Disk::copy() method resolves caller-controlled paths via realpath() against the process working directory, then opens matched files directly with fopen(rb+) and stream_copy_to_stream(), bypassing Flysystem's path confinement entirely. When the overwritten target is a web-accessible PHP file, this escalates to remote code execution; no public exploit is identified at time of analysis.
RemediationAI
Upgrade to Laravel Excel 3.1.70, which is confirmed patched via the official release at https://github.com/SpartnerNL/Laravel-Excel/releases/tag/3.1.70 and commit b5cafdfcf7ec63924e83303763be8fcae340f70b. The fix removes the realpath() bypass branch in Disk::copy() and routes all writes through Flysystem's put() method, restoring disk-root path confinement. Prior to patching, applications should enforce server-side validation of export destination paths to ensure they resolve within the intended Flysystem disk root before being passed to Excel::store() or equivalent methods - rejecting any path whose realpath() resolves outside the disk root. Additionally, configure OS-level file permissions so the web server process cannot write to PHP application files; this does not prevent arbitrary file overwrite of other writable files but eliminates the RCE escalation path. The 3.1.70 release also fixes a related cleanup regression where temporary files were not deleted on disk failure, addressed via a try/finally block in src/Excel.php.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Laravel Excel (Composer package spartnernl/laravel-excel) wraps PhpSpreadsheet to provide Excel and CSV export/import for Laravel applications. The root cause (CWE-22, Path Traversal) lives in src/Files/Disk.php in the Disk::copy() method across versions 3.1.8-3.1.69. When realpath($destination) returns a truthy result - meaning the path resolves to an existing file - the code bypasses the Flysystem storage abstraction and opens the raw filesystem path with fopen($destination, 'rb+'), then writes export content via stream_copy_to_stream(). The rb+ mode opens without truncating, so if the new export is shorter than the original file, trailing bytes from the old content remain - a secondary corruption artifact. Flysystem's disk-root confinement is only exercised via the else branch ($this->put()), which the vulnerable code skips for any pre-existing file. The fix in 3.1.70 removes the realpath() branch entirely, routing all writes through $this->put() unconditionally. CPE: cpe:2.3:a:spartnernl:laravel-excel:*:*:*:*:*:*:*:*.
Know when Laravel Excel 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
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Network vector applies as path reaches server via HTTP; AC:H reflects requirement for existing writable target file; PR:L for authenticated app-level access controlling export destination; C/I/A:H via RCE chain through PHP file overwrite.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Laravel Excel provides supercharged Excel exports and imports in Laravel. From 3.1.8 until 3.1.70, in src/Files/Disk.php the Maatwebsite\Excel\Files\Disk::copy() method resolves the caller-controlled $destination supplied through Excel::store(), $export->store(), or storeExcel() against the process working directory with realpath() instead of the configured filesystem disk. If the path names an existing writable file, Disk::copy() opens it with fopen() in rb+ mode and uses stream_copy_to_stream(), bypassing Flysystem path confinement and allowing an attacker whose application input controls the export path to overwrite arbitrary existing files with export content. The rb+ behavior creates a non-truncating overwrite and trailing bytes when the new export is shorter, and overwriting an executable PHP file can lead to remote code execution. This issue is fixed in version 3.1.70.
Technical POC Analysis
CWE-22 (path traversal) combined with CWE-73 (external control of file name or path).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Laravel Excel versions 3.1.8-3.1.69 contain a file path vulnerability that enables authenticated users to overwrite application files and potentially gain control of affected servers. The vulnerability carries elevated risk because no security patch is currently available from the vendor, requiring immediate action to protect application integrity and prevent unauthorized access.
No vendor-released patch identified at time of analysis. Implement strict file system access controls limiting write permissions to necessary directories only; restrict export endpoint access through authentication and authorization controls; disable export functionality in environments where it is not essential; implement file integrity checks on web-accessible files; maintain segmented backups of critical application files with immutable storage protection.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
EUVD-2026-69706
GHSA-c7r6-vx3h-w5g2
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB