# CVE-2024-45060: Unauthenticated Cross-Site-Scripting (XSS) in sample file in PHPSpreadsheet

- Severity: High 7.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.51%, higher than 44% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-10-07T14:43:30.000Z
- Modified: 2026-06-17T07:53:30.787Z
- Also known as: GHSA-v66g-p9x6-v98p
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- PHPOffice PhpSpreadsheet: < 1.29.2; >= 2.0.0, < 2.1.1; >= 2.2.0, < 2.3.0; before 1.29.2; from 2.0.0 before 2.1.1; from 2.2.0 before 2.3.0
- phpoffice/phpspreadsheet (Packagist): from 2.2.0 before 2.3.0; before 1.29.2; from 2.0.0 before 2.1.1
- phpoffice/phpexcel (Packagist): up to 1.8.2

## Every score

- GitHub_M: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-v66g-p9x6-v98p> (exploit, mitigation, third-party-advisory, web)
- <https://github.com/PHPOffice/PhpSpreadsheet/blob/d50b8b5de7e30439fb57eae7df9ea90e79fa0f2d/samples/Basic/45_Quadratic_equation_solver.php#L56> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-45060> (advisory)
- <https://github.com/PHPOffice/PhpSpreadsheet/commit/3990173db1207767139e63d33783beafada57007> (web)
- <https://github.com/PHPOffice/PhpSpreadsheet/commit/bc74f3aa1d76f191c6c7c3631e286abb25c38759> (web)
- <https://github.com/PHPOffice/PhpSpreadsheet/commit/fb42a103f14cfce258c836b31f4a71f1fb1a9747> (web)
- <https://github.com/PHPOffice/PhpSpreadsheet> (package)

## Sources

- CVE List: [CVE-2024-45060](https://www.cve.org/CVERecord?id=CVE-2024-45060), CVE Terms of Use, modified 2024-10-08
- GitHub Advisory Database: [GHSA-v66g-p9x6-v98p](https://github.com/advisories/GHSA-v66g-p9x6-v98p), CC-BY-4.0, modified 2025-03-06
- NVD: [CVE-2024-45060](https://nvd.nist.gov/vuln/detail/CVE-2024-45060), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-45060 · Whole record: https://cve.day/CVE-2024-45060.json · Rebuilt by cve.day 2026-11-25T22:58:46.145Z
