Live threats

All CVEs / Phpoffice

CVE-2024-56412Phpoffice Phpspreadsheet

Medium 4.8

Priority
29
CVSS 4.0
4.8
EPSS
0.5%
probability of exploitation in 30 days · percentile 36
Auth required
Yes
Published
Jan 3, 2025
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:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

What happens

PhpSpreadsheet is a PHP library for reading and writing spreadsheet files. Versions prior to 3.7.0, 2.3.5, 2.1.6, and 1.29.7 are vulnerable to bypass of the cross-site scripting sanitizer using the javascript protocol and special characters. An attacker can use special characters, so that the library processes the javascript protocol with special characters and generates an HTML link. Versions 3.7.0, 2.3.5, 2.1.6, and 1.29.7 contain a patch for the issue.

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 ≥ 3.0.0 < 3.7.0 3.7.0 composer require "phpoffice/phpspreadsheet:^3.7.0"
Packagist phpoffice/phpspreadsheet < 1.29.7 1.29.7 composer require "phpoffice/phpspreadsheet:^1.29.7"
Packagist phpoffice/phpspreadsheet ≥ 2.0.0 < 2.1.6 2.1.6 composer require "phpoffice/phpspreadsheet:^2.1.6"
Packagist phpoffice/phpspreadsheet ≥ 2.2.0 < 2.3.5 2.3.5 composer require "phpoffice/phpspreadsheet:^2.3.5"

Per OSV / GitHub Advisories (GHSA-q9jv-mm3r-j47r). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
phpofficephpspreadsheet< 1.29.7
phpofficephpspreadsheet≥ 2.0.0 < 2.1.6
phpofficephpspreadsheet≥ 2.2.0 < 2.3.5
phpofficephpspreadsheet≥ 3.0.0 < 3.7.0

Official sources

References

Links published by the sources. Open them with care.