Skip to content
OpenAdvisories
Medium · 5.4 CVE-2024-45292 EUVD-2024-3128GHSA-r8w8-74ww-j4wh

PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via JavaScript hyperlinks

Published Oct 7, 2024 · Updated Oct 7, 2024 · 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.

Affected products

VendorProductAffectedFixed
PHPOffice PhpSpreadsheet < 1.29.2, >= 2.0.0, < 2.1.1, >= 2.2.0, < 2.3.0 —

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist phpoffice/phpexcel <= 1.8.2 — GHSA-r8w8-74ww-j4wh
Packagist phpoffice/phpspreadsheet >= 2.2.0, < 2.3.0 2.3.0 GHSA-r8w8-74ww-j4wh
Packagist phpoffice/phpspreadsheet < 1.29.2 1.29.2 GHSA-r8w8-74ww-j4wh
Packagist phpoffice/phpspreadsheet >= 2.0.0, < 2.1.1 2.1.1 GHSA-r8w8-74ww-j4wh

References