CVE-2024-45291 in Phpoffice Phpspreadsheet
PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. It's possible for an attacker to construct an XLSX file that links images from arbitrary paths. When embedding images has been enabled in HTML writer with `$writer->setEmbedImages(true);` those files will be included in the output as `da...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Phpoffice | Phpspreadsheet | < 1.29.2 ≥ 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. It's possible for an attacker to construct an XLSX file that links images from arbitrary paths. When embedding images has been enabled in HTML writer with `$writer->setEmbedImages(true);` those files will be included in the output as `data:` URLs, regardless of the file's type. Also URLs can be used for embedding, resulting in a Server-Side Request Forgery vulnerability. When embedding images has been enabled, an attacker can read arbitrary files on the server and perform arbitrary HTTP GET requests. Note that any PHP protocol wrappers can be used, meaning that if for example the `expect://` wrapper is enabled, also remote code execution is possible. This issue has been addressed in release versions 1.29.2, 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-45291 |
|---|---|
| BreachSpider ID | BS-2024-GLOBAL-213225-H |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Published | 2024-10-07 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-22: Path Traversal
Attacker manipulates file path inputs to access files outside the intended directory.
CWE-36: CWE-36
CWE-918: Server-Side Request Forgery (SSRF)
Attacker causes the server to make HTTP requests to attacker-chosen destinations, potentially reaching internal services.
Related attack patterns (CAPEC)
CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic via CWE-22
CAPEC-76 Manipulating Web Input to File System Calls via CWE-22
CAPEC-78 Using Escaped Slashes in Alternate Encoding via CWE-22
CAPEC-79 Using Slashes in Alternate Encoding via CWE-22
CAPEC-597 Absolute Path Traversal via CWE-36
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
A vulnerability in PHPSpreadsheet allows attackers to construct XLSX files that embed images from arbitrary paths, which can be included in HTML output as data URLs, potentially leading to remote code execution or data leakage.
An attacker can create a malicious XLSX file with embedded images pointing to arbitrary file paths on the server. If the HTML writer in PHPSpreadsheet is configured to embed images, these files are included in the HTML output as data URLs, which can be exploited to access sensitive files or execute code.
Questions
What is CVE-2024-45291?
A vulnerability in PHPSpreadsheet allows attackers to construct XLSX files that embed images from arbitrary paths, which can be included in HTML output as data URLs, potentially leading to remote code execution or data leakage.
What is the CVSS score for CVE-2024-45291?
CVE-2024-45291 has CVSS 8.8 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. EPSS: 1.1%.
Is CVE-2024-45291 actively exploited?
No confirmed active exploitation of CVE-2024-45291 as of 2026-09-25.
How do I remediate CVE-2024-45291?
Priority: IMMEDIATE.
What systems are affected by CVE-2024-45291?
CVE-2024-45291 affects Phpoffice Phpspreadsheet.
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.