Live threats

All CVEs / Phpoffice

CVE-2024-45292Phpoffice Phpspreadsheet

Medium 5.4

Priority
32
CVSS 3.1
5.4
EPSS
0.5%
probability of exploitation in 30 days · percentile 36
Auth required
Yes
Published
Oct 7, 2024
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-79
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Phpspreadsheet.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Packagist phpoffice/phpexcel ≤ 1.8.2 no fixed version —
Packagist phpoffice/phpspreadsheet ≥ 2.2.0 < 2.3.0 2.3.0 composer require "phpoffice/phpspreadsheet:^2.3.0"
Packagist phpoffice/phpspreadsheet < 1.29.2 1.29.2 composer require "phpoffice/phpspreadsheet:^1.29.2"
Packagist phpoffice/phpspreadsheet ≥ 2.0.0 < 2.1.1 2.1.1 composer require "phpoffice/phpspreadsheet:^2.1.1"

Per OSV / GitHub Advisories (GHSA-r8w8-74ww-j4wh). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
phpofficephpspreadsheet< 1.29.2
phpofficephpspreadsheet≥ 2.0.0 < 2.1.1
phpofficephpspreadsheet≥ 2.2.0 < 2.3.0

Official sources

References

Links published by the sources. Open them with care.