# CVE-2024-45292: PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via JavaScript hyperlinks

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/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.34%, higher than 29% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-10-07T15:58:25.000Z
- Modified: 2026-06-17T07:53:57.900Z
- Also known as: GHSA-r8w8-74ww-j4wh
- 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. `\PhpOffice\PhpSpreadsheet\Writer\Html` does not sanitize "javascript:" URLs from hyperlink `href` attributes, resulting in a Cross-Site Scripting vulnerability. 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 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/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:L/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-r8w8-74ww-j4wh> (exploit, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-45292> (advisory)
- <https://github.com/PHPOffice/PhpSpreadsheet/commit/392dd08c5569b623060784e1333454d64df1f03d> (web)
- <https://github.com/PHPOffice/PhpSpreadsheet/commit/8b9b378ecdc603234a34aab3b293d2cdc8e9210e> (web)
- <https://github.com/PHPOffice/PhpSpreadsheet/commit/f0b70ed1086348904b27772b264e1605ba6c1d6d> (web)
- <https://github.com/PHPOffice/PhpSpreadsheet> (package)

## Sources

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

---

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