# Laravel Excel writes exports outside the configured filesystem disk when given a caller-controlled path

High severity, published 2026-09-08. Update maatwebsite/excel to 3.1.70 or later: composer update maatwebsite/excel.

Canonical URL: https://buzzphp.com/security/ghsa-c7r6-vx3h-w5g2 · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 7.5) |
| Published | 2026-09-08 |
| Updated | 2026-09-08 |
| CVE | [CVE-2026-84374](https://nvd.nist.gov/vuln/detail/CVE-2026-84374) |
| GHSA | [GHSA-c7r6-vx3h-w5g2](https://github.com/advisories/GHSA-c7r6-vx3h-w5g2) |
| Weakness | CWE-22, CWE-73 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| maatwebsite/excel | >= 3.1.8, < 3.1.70 | 3.1.70 |

## What to do

Update maatwebsite/excel to 3.1.70 or later: composer update maatwebsite/excel.

Check which version you run with `composer show maatwebsite/excel`, and every affected package with `composer audit`.

## About this advisory

Summary

Excel::store() resolved the destination path against the process working directory rather than the configured filesystem disk. When that path resolved to an existing file, the export was written straight to it with fopen(), bypassing the disk entirely. An application that passes a user-controlled value as the export path could therefore be made to overwrite an arbitrary existing file that the PHP process can write to, with content the user controls.

Details

Maatwebsite\Excel\Files\Disk::copy() contained two paths:

$destination is the $filePath argument given to Excel::store(), $export-store() or -storeExcel().

## Links

- [GHSA-c7r6-vx3h-w5g2 on GitHub](https://github.com/advisories/GHSA-c7r6-vx3h-w5g2)
- [CVE-2026-84374 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-84374)
- [All Composer security advisories](https://buzzphp.com/security)
