CVE-2024-56365
Description
PhpSpreadsheet is a PHP library for reading and writing spreadsheet files. Versions prior to 3.7.0, 2.3.5, 2.1.6, and 1.29.7 are vulnerable to unauthorized reflected cross-site scripting in the constructor of the `Downloader` class. Using the `/vendor/phpoffice/phpspreadsheet/samples/download.php` script, an attacker can perform a cross-site scripting attack. Versions 3.7.0, 2.3.5, 2.1.6, and 1.29.7 contain a patch for the issue.
How to fix
- phpoffice phpspreadsheet1.29.7, 2.1.6, 2.3.5, 3.7.0 or later
- phpoffice/phpspreadsheet3.7.0, 1.29.7, 2.1.6, 2.3.5 or later
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| phpoffice phpspreadsheet | v < 1.29.7, 2.0.0 ≤ v < 2.1.6, 2.2.0 ≤ v < 2.3.5, 3.3.0 ≤ v < 3.7.0 | 1.29.7, 2.1.6, 2.3.5, 3.7.0 |
| phpoffice/phpspreadsheetPackagist | 3.0.0 ≤ v < 3.7.0, v < 1.29.7, 2.0.0 ≤ v < 2.1.6, 2.2.0 ≤ v < 2.3.5 | 3.7.0, 1.29.7, 2.1.6, 2.3.5 |
| phpoffice/phpexcelPackagist | v ≤ 1.8.2 | — |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.