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

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.84%, higher than 55% of CVEs (2026-11-30)
- Published: 2026-09-01T21:28:30.355Z
- Modified: 2026-09-09T21:09:13.080Z
- Also known as: GHSA-c7r6-vx3h-w5g2
- Weaknesses: CWE-22, CWE-73
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- SpartnerNL Laravel-Excel: >= 3.1.8, < 3.1.70
- maatwebsite/excel (Packagist): from 3.1.8 before 3.1.70

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/SpartnerNL/Laravel-Excel/security/advisories/GHSA-c7r6-vx3h-w5g2> (web)
- <https://github.com/SpartnerNL/Laravel-Excel/commit/b5cafdfcf7ec63924e83303763be8fcae340f70b> (web)
- <https://github.com/SpartnerNL/Laravel-Excel/releases/tag/3.1.70> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-84374> (advisory)
- <https://github.com/SpartnerNL/Laravel-Excel> (package)

## Sources

- CVE List: [CVE-2026-84374](https://www.cve.org/CVERecord?id=CVE-2026-84374), CVE Terms of Use, modified 2026-09-04
- GitHub Advisory Database: [GHSA-c7r6-vx3h-w5g2](https://github.com/advisories/GHSA-c7r6-vx3h-w5g2), CC-BY-4.0, modified 2026-09-08
- NVD: [CVE-2026-84374](https://nvd.nist.gov/vuln/detail/CVE-2026-84374), Public domain, modified 2026-09-09

---

Page: https://cve.day/CVE-2026-84374 · Whole record: https://cve.day/CVE-2026-84374.json · Rebuilt by cve.day 2026-11-25T22:59:36.041Z
