BuzzPHP
LightDarkSystem

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

High severity. Published 8 September 2026. Update maatwebsite/excel to 3.1.70 or later: composer update maatwebsite/excel.

Which versions are affected?

PackageAffected versionsFixed in
maatwebsite/excel (opens in a new tab)>= 3.1.8, < 3.1.703.1.70

What should you do?

Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:

composer show maatwebsite/excel
composer audit

Advisory details

SeverityHighCVSS 7.5
Published
Updated
CVECVE-2026-84374 (opens in a new tab)
GHSAGHSA-c7r6-vx3h-w5g2 (opens in a new tab)
WeaknessCWE-22, CWE-73

What the advisory says

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().

Source: GHSA-c7r6-vx3h-w5g2 (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .

All Composer security advisories