CVE-2024-56366
HIGH 8.3CVSS 4.0PhpSpreadsheet allows unauthorized Reflected XSS in the Accounting.php file
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 Accounting.php file. Using the /vendor/phpoffice/phpspreadsheet/samples/Wizards/NumberFormat/Accounting.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.
- Published
- 3 Jan 2025
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-79
- Also known as
- GHSA-c6fv-7vh8-2rhr
- Sources
- NVDJSONOSV GHSA-c6fv-7vh8-2rhrJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | HIGH 8.3 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:L/SI:H/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:L/SI:H/SA:L | |
| OSV | GitHub | CVSS 3.1 | HIGH 7.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | phpoffice | phpspreadsheetcpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:* |
< 1.29.7 | 1.29.7 |
| NVD | phpoffice | phpspreadsheetcpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:* |
>= 2.0.0, < 2.1.6 | 2.1.6 |
| NVD | phpoffice | phpspreadsheetcpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:* |
>= 2.2.0, < 2.3.5 | 2.3.5 |
| NVD | phpoffice | phpspreadsheetcpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:* |
>= 3.3.0, < 3.7.0 | 3.7.0 |
| OSV | Packagist | phpoffice/phpspreadsheet | >= 3.0.0, < 3.7.0 | 3.7.0 |
| OSV | Packagist | phpoffice/phpspreadsheet | < 1.29.7 | 1.29.7 |
| OSV | Packagist | phpoffice/phpspreadsheet | >= 2.0.0, < 2.1.6 | 2.1.6 |
| OSV | Packagist | phpoffice/phpspreadsheet | >= 2.2.0, < 2.3.5 | 2.3.5 |
| OSV | Packagist | phpoffice/phpexcel | <= 1.8.2 |
References
- https://github.com/PHPOffice/PhpSpreadsheet/commit/700a80346be269af668914172bc6f4521982d0b4 · Patch, WEB
- https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-c6fv-7vh8-2rhr · Exploit, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-56366 · ADVISORY
- https://github.com/PHPOffice/PhpSpreadsheet · PACKAGE
History
- 25 Nov 2026 20:57 UTC · NVD: first stored (published 3 Jan 2025)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 3 Jan 2025)