CVE-2024-45060
published high CVSS 3.1 · 7.1Unauthenticated Cross-Site-Scripting (XSS) in sample file in PHPSpreadsheet
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| PHPOffice | — | PhpSpreadsheet< 1.29.2 · >= 2.0.0, < 2.1.1 · >= 2.2.0, < 2.3.0 | Affected | Not stated | GitHub_M |
| phpoffice | — | phpspreadsheet0 to < 1.29.2 · 2.0.0 to < 2.1.1 · 2.2.0 to < 2.3.0 · Other versions: unknown | Affected | Not stated | CISA-ADP |
Description
PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. One of the sample scripts in PhpSpreadsheet is susceptible to a cross-site scripting (XSS) vulnerability due to improper handling of input where a number is expected leading to formula injection. The code in in `45_Quadratic_equation_solver.php` concatenates the user supplied parameters directly into spreadsheet formulas. This allows an attacker to take control over the formula and output unsanitized data into the page, resulting in JavaScript execution. This issue has been addressed in release versions 1.29.2, 2.1.1, and 2.3.0. All users are advised to upgrade. There are no known workarounds for this vulnerability.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.1 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| PHPOffice | PhpSpreadsheet | < 1.29.2 (affected)>= 2.0.0, < 2.1.1 (affected)>= 2.2.0, < 2.3.0 (affected) | GitHub_M · cna |
| phpoffice | phpspreadsheet | 0 to < 1.29.2 (affected · custom)2.0.0 to < 2.1.1 (affected · custom)2.2.0 to < 2.3.0 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-79 CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References
2Provider assertions
2GitHub_M · cna
Unauthenticated Cross-Site-Scripting (XSS) in sample file in PHPSpreadsheet
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- b64e2d8d224f90a962eaf76b5723a3b577560e1a366b464bdf56f535d1fec2fc
- Ingested
- 23 Sep 2026, 08:27:32 UTC
- Source record
- Official CVE record