Skip to content
OpenAdvisories
Medium · 5.4 CVE-2024-45046 EUVD-2024-2677GHSA-wgmf-q9vr-vww6

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

Published Aug 28, 2024 · Updated Aug 29, 2024 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
PHPOffice PhpSpreadsheet < 2.1.0 —

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist phpoffice/phpexcel <= 1.8.2 — GHSA-wgmf-q9vr-vww6
Packagist phpoffice/phpspreadsheet >= 2.0.0, < 2.1.0 2.1.0 GHSA-wgmf-q9vr-vww6
Packagist phpoffice/phpspreadsheet < 1.29.1 1.29.1 GHSA-wgmf-q9vr-vww6

Advisories 1

References