CVE-2024-47873 in Phpoffice Phpspreadsheet
PhpSpreadsheet is a PHP library for reading and writing spreadsheet files. The XmlScanner class has a scan method which should prevent XXE attacks. However, prior to versions 1.9.4, 2.1.3, 2.3.2, and 3.4.0, the regexes used in the `scan` method and the findCharSet method can be bypassed by using UCS-4 and encoding g...
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.4 ≥ 2.0.0, < 2.1.3 ≥ 2.2.0, < 2.3.2 ≥ 3.3.0, < 3.4.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.
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
PhpSpreadsheet is a PHP library for reading and writing spreadsheet files. The XmlScanner class has a scan method which should prevent XXE attacks. However, prior to versions 1.9.4, 2.1.3, 2.3.2, and 3.4.0, the regexes used in the `scan` method and the findCharSet method can be bypassed by using UCS-4 and encoding guessing. An attacker can bypass the sanitizer and achieve an XML external entity attack. Versions 1.9.4, 2.1.3, 2.3.2, and 3.4.0 fix the issue.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2024-47873 |
|---|---|
| BreachSpider ID | BS-2024-GLOBAL-045274-H |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| Published | 2024-11-18 |
| 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
A vulnerability in PhpSpreadsheet versions prior to 1.9.4, 2.1.3, 2.3.2, and 3.4.0 allows attackers to bypass the XML external entity (XXE) protection mechanism by exploiting weaknesses in the regexes used in the XmlScanner class's scan and findCharSet methods. This can lead to XXE attacks.
The attack involves crafting a specially designed XML input that uses UCS-4 encoding and encoding guessing to bypass the regex-based sanitization in the XmlScanner class. This allows the attacker to inject and execute external entities, potentially leading to information disclosure, denial of service, or server-side request forgery.
Questions
What is CVE-2024-47873?
A vulnerability in PhpSpreadsheet versions prior to 1.9.4, 2.1.3, 2.3.2, and 3.4.0 allows attackers to bypass the XML external entity (XXE) protection mechanism by exploiting weaknesses in the regexes used in the XmlScanner class's scan and findCharSet methods. This can lead to XXE attacks.
What is the CVSS score for CVE-2024-47873?
CVE-2024-47873 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: 1.0%.
Is CVE-2024-47873 actively exploited?
No confirmed active exploitation of CVE-2024-47873 as of 2026-09-25.
How do I remediate CVE-2024-47873?
Priority: HIGH. PSIRT: [email protected]
What systems are affected by CVE-2024-47873?
CVE-2024-47873 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.