CVE-2026-84374

maatwebsite/excel: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (CVE-2026-84374)

Beschreibung

Laravel Excel bietet beschleunigte Excel-Exporte und -Importe in Laravel. Von Version 3.1.8 bis 3.1.70 löst die Methode `Maatwebsite\Excel\Files\Disk::copy()` im Dateipfad `src/Files/Disk.php` den vom Aufrufer kontrollierten `$destination`, der über `Excel::store()`, `$export->store()` oder `storeExcel()` bereitgestellt wird, gegenüber dem Prozessarbeitsverzeichnis mit `realpath()` auf und nicht gegen das konfigurierte Dateisystem-Laufwerk. Wenn der Pfad eine existierende beschreibbare Datei angibt, öffnet `Disk::copy()` sie mit `fopen()` im rb+-Modus und verwendet `stream_copy_to_stream()`, wodurch die Flysystem-Pfad-Einschränkung umgangen wird und einem Angreifer, dessen Anwendungsinput den Exportpfad steuert, das Überschreiben beliebiger existierender Dateien mit Exportinhalt ermöglicht. Das rb+-Verhalten führt zu einem nicht-truncierenden Überschreiben und nachfolgenden Bytes, wenn der neue Export kürzer ist, und das Überschreiben einer ausführbaren PHP-Datei kann zu einer Fernausführung von Code führen. Dieses Problem wird in Version 3.1.70 behoben.

Metriken

Severity
high
kein öffentlicher PoC bekannt
7.5
Quelle: cna-v3
45.4 %
Hoch — CVE rangiert über dem Median aller heute bewerteten CVEs (Rang ≥ 36 %).
0.6 %
Niedrig — Modell schätzt < 1 % Ausnutzungs-Wahrscheinlichkeit.
Veröffentlicht
2026-09-01 21:28 UTC
CWE-22, CWE-73

Weakness-Klassen (CWE)

  • CWE-22Base

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

    The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

    cwe.mitre.org →
  • CWE-73Base

    External Control of File Name or Path

    The product allows user input to control or influence paths or file names that are used in filesystem operations.

    cwe.mitre.org →

Re-Analyse & Statuswechsel

Chronologie der NVD-Audit-Events für diese CVE — Reanalyses, CVSS-Updates, CPE-Diffs.

  1. CVE Modified2026-09-04 03:17 UTC· 134c704f-9b21-4f2e-91b3-4a467353bcc0
    • SSVC: {"id":"CVE-2026-84374","role":"CISA Coordinator","options":[{"exploitation":"none"},{"automatable":"no"},{"technicalI…
  2. New CVE Received2026-09-01 22:17 UTC· security-advisories@github.com
    • 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: AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
    • CWE: CWE-22
    • CWE: CWE-73

Betroffene Produkte

Aus der Hersteller-/CERT-Meldung extrahierte Produkte und Versionsbereiche. Ein Version-Range wie „<4.14.6“ impliziert die Update-Empfehlung „auf 4.14.6 oder höher aktualisieren“.

  • composer

    maatwebsite/excel>= 3.1.8, < 3.1.70

    gefixt in 3.1.70

Quellen & Referenzen

IDCVE-2026-84374