CVE-2024-56411
PHP vulnerability analysis and mitigation

Overview

PhpSpreadsheet is a PHP library for reading and writing spreadsheet files. A cross-site scripting (XSS) vulnerability was discovered in versions prior to 3.7.0, 2.3.5, 2.1.6, and 1.29.7, affecting the hyperlink base in the HTML page header. The vulnerability was disclosed on January 3, 2025, and was assigned CVE-2024-56411 (NVD, GitHub Advisory).

Technical details

The vulnerability exists in the HTML page generation functionality where the hyperlink base is not properly sanitized before being included in the page header. The issue is present in the PhpOffice\PhpSpreadsheet\Writer\Html class, specifically in the generateHTMLHeader method. The vulnerability has been assigned a CVSS v3.1 base score of 5.4 (Medium) with vector AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N and CVSS v4.0 score of 4.8 (Medium) with vector AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N (GitHub Advisory).

Impact

When exploited, this vulnerability allows attackers to execute arbitrary JavaScript code in the browser. The vulnerability can be triggered when a user views a specially crafted Excel file that has been converted to HTML format (GitHub Advisory).

Exploitability

The vulnerability can be exploited by embedding a malicious payload in a file property that gets processed during the HTML conversion. Specifically, an attacker can manipulate the HyperlinkBase property in the docProps/app.xml file of an XLSX document. When this file is converted to HTML representation, the unsanitized property is included in the page header, leading to XSS execution (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in versions 3.7.0, 2.3.5, 2.1.6, and 1.29.7. The fix implements additional sanitization of special characters in strings. Users are advised to upgrade to these patched versions to mitigate the vulnerability (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-59989CRITICAL9.2
  • PHP logoPHP
  • phalcon/cphalcon
NoYesAug 21, 2026
CVE-2026-63135HIGH8.2
  • PHP logoPHP
  • yourls/yourls
NoYesAug 21, 2026
GHSA-p2ch-c2c3-4xm5MEDIUM6.1
  • PHP logoPHP
  • winter/wn-backend-module
NoYesAug 20, 2026
GHSA-8hgv-xc77-jmcrMEDIUM5.1
  • PHP logoPHP
  • getgrav/grav
NoYesAug 21, 2026
GHSA-hq84-x37p-j6q5MEDIUM4.5
  • PHP logoPHP
  • winter/wn-backend-module
NoYesAug 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management