CVE-2024-45046

PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via style information

Published Aug 28, 2024 CVSS 3.1 · 5.4 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2024-2677 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.
Github GHSA Github GHSA GHSA-wgmf-q9vr-vww6 PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via style information
History
Type Values Removed Values Added
First Time appeared Phpoffice
Phpoffice phpspreadsheet
CPEs cpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:*
Vendors & Products Phpoffice
Phpoffice phpspreadsheet
Type Values Removed Values Added
First Time appeared Phpspreadsheet Project
Phpspreadsheet Project phpspreadsheet
CPEs cpe:2.3:a:phpspreadsheet_project:phpspreadsheet:*:*:*:*:*:*:*:*
Vendors & Products Phpspreadsheet Project
Phpspreadsheet Project phpspreadsheet
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via style information
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 29, 2024, 1:11 PM
Reserved
Aug 21, 2024, 5:53 PM
Status
Analyzed
Published
Aug 28, 2024, 9:15 PM
Modified
Jun 17, 2026, 7:53 AM