PT-2024-31412 · Unknown · Phpspreadsheet
Stealthcopter
·
Published
2024-10-07
·
Updated
2024-10-17
·
CVE-2024-45060
CVSS v3.1
7.1
High
| Vector | AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N |
Name of the Vulnerable Software and Affected Versions
PHPSpreadsheet versions prior to 1.29.2
PHPSpreadsheet versions prior to 2.1.1
PHPSpreadsheet versions prior to 2.3.0
Description
The issue is related to a cross-site scripting (XSS) vulnerability in one of the sample scripts in PHPSpreadsheet, specifically due to improper handling of input where a number is expected, leading to formula injection. The code in
45 Quadratic equation solver.php concatenates user-supplied parameters directly into spreadsheet formulas, allowing an attacker to take control over the formula and output unsanitized data into the page, resulting in JavaScript execution. The impact of this vulnerability is expected to be relatively low since these are sample files that should not be included when the library is used properly. However, some popular WordPress plugins have unintentionally exposed this file, and addressing this issue can enhance security for users.Recommendations
For PHPSpreadsheet versions prior to 1.29.2, upgrade to version 1.29.2 or later.
For PHPSpreadsheet versions prior to 2.1.1, upgrade to version 2.1.1 or later.
For PHPSpreadsheet versions prior to 2.3.0, upgrade to version 2.3.0 or later.
As a temporary workaround, consider forcing the parameters to be numerical values by using
floatval() function for $ POST['A'], $ POST['B'], and $ POST['C'].Exploit
Fix
XSS
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Phpspreadsheet