CVE-2024-45046
published medium CVSS 3.1 · 5.4PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via style information
Package status and fixes
Description
PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. In affected versions `\PhpOffice\PhpSpreadsheet\Writer\Html` doesn't sanitize spreadsheet styling information such as font names, allowing an attacker to inject arbitrary JavaScript on the page. As a result an attacker may used a crafted spreadsheet to fully takeover a session of a user viewing spreadsheet files as HTML. This issue has been addressed in release version 2.1.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
- 5.4 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| PHPOffice | PhpSpreadsheet | < 2.1.0 (affected) | GitHub_M · cna |
| phpspreadsheet_project | phpspreadsheet | 0 to < 2.1.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
3Provider assertions
2GitHub_M · cna
PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via style information
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- d296df16dbb0df6a0ebefa5bb06f91263ba1a8b1999f795aeefa3b8cf6a0181e
- Ingested
- 23 Sep 2026, 08:27:32 UTC
- Source record
- Official CVE record