CVE-2026-84374: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in SpartnerNL Laravel-Excel
Description
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.
CVSS v3.1
Score 7.5high
Affected software
SpartnerNL
Laravel-Excel
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Laravel-Excel versions 3.1.8 through 3.1.69 contain a path traversal vulnerability in the Maatwebsite\Excel\Files\Disk::copy() method. This method resolves the caller-controlled $destination path using realpath() against the process working directory instead of the configured filesystem disk, bypassing Flysystem path confinement. If the destination path points to an existing writable file, Disk::copy() opens it in 'rb+' mode and overwrites it with export content without truncation, potentially leaving trailing bytes. Overwriting executable PHP files can lead to remote code execution. The vulnerability is fixed in version 3.1.70.
Potential Impact
An attacker who can control the export path can overwrite arbitrary writable files on the server, potentially including executable PHP files. This can lead to remote code execution, data corruption, and denial of service. The CVSS 3.1 score is 7.5 (High), reflecting network attack vector, high impact on confidentiality, integrity, and availability, and requiring low privileges but high attack complexity.
Mitigation Recommendations
A fix is available in Laravel-Excel version 3.1.70. Users should upgrade to version 3.1.70 or later to remediate this vulnerability. No other vendor advisories or temporary mitigations are provided. Patch status is confirmed by the version fix note in the description.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-09-01T16:27:58.129Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a9745b0acd9273b493a43ae
Added to database: 09/01/2026, 21:37:52 UTC
Last enriched: 09/07/2026, 12:35:50 UTC
Last updated: 10/16/2026, 06:48:19 UTC
Views: 97
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.