CVE-2024-45293 in Phpoffice Phpspreadsheet
PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. The security scanner responsible for preventing XXE attacks in the XLSX reader can be bypassed by slightly modifying the XML structure, utilizing white-spaces. On servers that allow users to upload their own Excel (XLSX) sheets, Server f...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, no integrity impact, no availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Phpoffice | Phpspreadsheet | < 1.29.1 ≥ 2.0.0, < 2.1.1 ≥ 2.2.0, < 2.3.0 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. The security scanner responsible for preventing XXE attacks in the XLSX reader can be bypassed by slightly modifying the XML structure, utilizing white-spaces. On servers that allow users to upload their own Excel (XLSX) sheets, Server files and sensitive information can be disclosed by providing a crafted sheet. The security scan function in src/PhpSpreadsheet/Reader/Security/XmlScanner.php contains a flawed XML encoding check to retrieve the input file's XML encoding in the toUtf8 function. The function searches for the XML encoding through a defined regex which looks for `encoding="*"` and/or `encoding='*'`, if not found, it defaults to the UTF-8 encoding which bypasses the conversion logic. This logic can be used to pass a UTF-7 encoded XXE payload, by utilizing a whitespace before or after the = in the attribute definition. Sensitive information disclosure through the XXE on sites that allow users to upload their own excel spreadsheets, and parse them using PHPSpreadsheet's Excel parser. This issue has been addressed in release versions 1.29.1, 2.1.1, and 2.3.0. All users are advised to upgrade. There are no known workarounds for this vulnerability.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2024-45293 |
|---|---|
| BreachSpider ID | BS-2024-GLOBAL-213228-H |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| Published | 2024-10-07 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-611: CWE-611
Related attack patterns (CAPEC)
CAPEC-221 Data Serialization External Entities Blowup via CWE-611
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
CVE-2024-45293 affects PHPSpreadsheet, a PHP library for reading and writing spreadsheet files. A flaw in the XML encoding check allows XXE attacks, leading to potential sensitive information disclosure on servers that allow user-uploaded Excel sheets. The vulnerability is addressed in versions 1.29.1, 2.1.1, and 2.3.0. All users are advised to upgrade.
The vulnerability can be exploited by uploading a crafted XLSX file with a modified XML structure, specifically by adding white-spaces before or after the '=' in the encoding attribute. This bypasses the security scanner, allowing XXE payloads to be executed, potentially leading to the disclosure of sensitive server files and information.
Compensating controls AI-drafted, review before use
Implement strict input validation and sanitization for all user-uploaded XLSX files. Consider using a secure file upload handler that checks for and blocks suspicious file content.
NERC CIP: CIP-007 CIP-007-R2
IEC 62443: SR 7.6
Not validated for your network. A compensating control does not replace the vendor fix.
Questions
What is CVE-2024-45293?
CVE-2024-45293 affects PHPSpreadsheet, a PHP library for reading and writing spreadsheet files. A flaw in the XML encoding check allows XXE attacks, leading to potential sensitive information disclosure on servers that allow user-uploaded Excel sheets. The vulnerability is addressed in versions 1.29.1, 2.1.1, and 2.3.0. All users are advised to upgrade.
What is the CVSS score for CVE-2024-45293?
CVE-2024-45293 has CVSS 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N. EPSS: 3.8%.
Is CVE-2024-45293 actively exploited?
No confirmed active exploitation of CVE-2024-45293 as of 2026-09-25.
How do I remediate CVE-2024-45293?
Priority: HIGH.
What systems are affected by CVE-2024-45293?
CVE-2024-45293 affects Phpoffice Phpspreadsheet.
What NERC-CIP standard applies to CVE-2024-45293?
NERC CIP CIP-007 CIP-007-R2: This CVE violates CIP-007-R2 as it allows unauthorized access to sensitive information, which could compromise the security of the control system environment.
What IEC 62443 requirement maps to CVE-2024-45293?
IEC 62443 SR 7.6: This CVE maps to SR 7.6 as it involves a vulnerability that can lead to the disclosure of sensitive information, which is a critical security concern in ICS environments.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Phpoffice","product":"Phpspreadsheet","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.