CVE-2024-45292: PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via JavaScript hyperlinks
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.38804%
CWE
Published
10/7/2024
Updated
3/6/2025
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| phpoffice/phpspreadsheet | composer | >= 2.2.0, < 2.3.0 | 2.3.0 |
| phpoffice/phpspreadsheet | composer | < 1.29.2 | 1.29.2 |
| phpoffice/phpspreadsheet | composer | >= 2.0.0, < 2.1.1 | 2.1.1 |
| phpoffice/phpexcel | composer | <= 1.8.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the unvalidated handling of hyperlink URLs in the HTML generation process. The commit diff shows the fix was applied to the generateRow method in Html.php, where hyperlink URLs were previously embedded directly via htmlspecialchars() without protocol checks. The added validation logic in the patch (checking for allowed protocols like http/https) confirms this was the vulnerable code path. The PoC and CWE-79 classification further align with this being an XSS vector via improper output sanitization.