CVE-2024-56410 in PhpSpreadsheetinfo

Summary

by MITRE • 01/03/2025

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 have a cross-site scripting (XSS) vulnerability in custom properties. The HTML page is generated without clearing custom properties. Versions 3.7.0, 2.3.5, 2.1.6, and 1.29.7 contain a patch for the issue.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 04/17/2025

The vulnerability identified as CVE-2024-56410 affects PhpSpreadsheet, a widely-used PHP library designed for handling spreadsheet file operations including reading and writing various formats such as xlsx, xls, and csv. This library serves as a critical component in web applications that process spreadsheet data, making it a common target for security researchers and malicious actors. The vulnerability specifically resides within the handling of custom properties within spreadsheet files, representing a cross-site scripting weakness that could potentially compromise user sessions and data integrity across web applications leveraging this library.

The technical flaw manifests when PhpSpreadsheet processes custom properties embedded within spreadsheet files without proper sanitization of user-controllable input. Custom properties in spreadsheet formats can contain arbitrary HTML content that gets rendered in web applications when these files are processed and displayed. The vulnerability occurs because the library fails to properly escape or filter HTML characters from custom properties before incorporating them into generated HTML output, creating an avenue for malicious code injection. This issue is classified as a CWE-79: Cross-Site Scripting vulnerability, which represents one of the most prevalent and dangerous web application security flaws according to the CWE catalog.

The operational impact of this vulnerability extends beyond simple data corruption or display issues. When exploited, the XSS flaw allows attackers to inject malicious scripts that can execute within the context of a victim's browser session. This could enable attackers to steal session cookies, perform unauthorized actions on behalf of users, redirect victims to malicious sites, or even exfiltrate sensitive data from applications that process spreadsheet files. The vulnerability affects multiple versions of the library, with specific patch releases available for versions 3.7.0, 2.3.5, 2.1.6, and 1.29.7, indicating that the maintainers have recognized the severity of the issue and provided remediation paths for affected users.

Organizations utilizing PhpSpreadsheet in their applications should prioritize immediate patching of affected versions to mitigate the risk of XSS exploitation. The recommended mitigation strategy involves upgrading to the patched versions mentioned in the CVE description, which contain proper input sanitization mechanisms for custom properties. Security teams should also implement additional defensive measures such as Content Security Policy headers, input validation at multiple layers, and regular security scanning of applications that process user-uploaded spreadsheet files. This vulnerability aligns with ATT&CK technique T1566.001 for initial access through spearphishing attachments and demonstrates the importance of proper input sanitization in web applications processing untrusted data from external sources. The affected library's widespread adoption in enterprise environments makes this vulnerability particularly concerning, as it could potentially impact numerous applications across different industries that rely on spreadsheet processing functionality.

Responsible

GitHub M

Reservation

12/23/2024

Disclosure

01/03/2025

Moderation

accepted

CPE

ready

EPSS

0.00328

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!