CVE-2024-56412
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 bypass of the cross-site scripting sanitizer using the javascript protocol and special characters. An attacker can use special characters, so that the library processes the javascript protocol with special characters and generates an HTML link. 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.0.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.