Cross-site scripting in PhpSpreadsheet - CVE-2024-56412

 

Cross-site scripting in PhpSpreadsheet - CVE-2024-56412

Published: January 3, 2025 / Updated: October 13, 2026


Vulnerability identifier: #VU154205
CSH Severity: Medium
CVSS v4: 5.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N]
CVE-ID: CVE-2024-56412
CWE-ID: CWE-79
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary JavaScript in a user's browser.

The vulnerability exists due to improper neutralization of script-containing content in the PhpSpreadsheet XSS sanitizer when processing content containing the javascript protocol and special characters. A remote attacker can supply specially crafted content using the javascript protocol and special characters to execute arbitrary JavaScript in a user's browser.


Affected software

PhpSpreadsheet

How to mitigate CVE-2024-56412

Install security update from vendor's website.

PhpSpreadsheet - addressed in versions 1.29.7, 2.1.6, 2.3.5, 3.7.0

External References

Related Security Bulletins