XML External Entity Reference (XXE) in PHPSpreadsheet's XLSX reader
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.
- Published
- Oct 7, 2024
- Updated
- Jun 17, 2026
- EPSS
- 2.8% · 86th percentile
- CWE
- CWE-611
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
31
Monitor
Low priority for now.
- CVSS
- 30 / 40 · 7.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 2.8%
CISA SSVC decision
- Exploitation
- proof of concept
- Automatable
- yes
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 7.5
- CNA · GitHub_M
- 7.5
- agree
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for the hundreds of thousands of vulnerabilities in the database; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpAffected systems
| Vendor | Product | CPE |
|---|---|---|
| phpoffice | phpspreadsheet | cpe:2.3:a:phpoffice:phpspreadsheet |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- phpoffice phpspreadsheetbefore 1.29.1
- phpoffice phpspreadsheet2.0.0 and later · before 2.1.1
- phpoffice phpspreadsheet2.2.0 and later · before 2.3.0
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
PHPOffice PhpSpreadsheet
- >= 2.2.0, < 2.3.0, < 1.29.1, >= 2.0.0, < 2.1.1affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Packagist | phpoffice/phpexcel | up to and including 1.8.2 | — |
| Packagist | phpoffice/phpspreadsheet | from 2.0.0 · before 2.1.1 | 2.1.1 |
| Packagist | phpoffice/phpspreadsheet | from 2.2.0 · before 2.3.0 | 2.3.0 |
| Packagist | phpoffice/phpspreadsheet | before 1.29.1 | 1.29.1 |
Same product
phpoffice: all recordsOther highest-scoring records for the same primary product.
- CVE-2018-19277securityScan() in PHPOffice PhpSpreadsheet through 1.5.0 allows a bypass of protection mechanisms for XXE via UTF-7 encoding in a .xlsx file37Monitor
- CVE-2026-45034PhpSpreadsheet: File::prohibitWrappers bypass36Monitor
- CVE-2026-34084PhpSpreadsheet SSRF and RCE via PHP stream wrappers in IOFactory::load36Monitor
- CVE-2024-45291Path traversal and Server-Side Request Forgery in HTML writer when embedding images is enabled in PHPSpreadsheet35Monitor
- CVE-2019-12331PHPOffice PhpSpreadsheet before 1.8.0 has an XXE issue.35Monitor
- CVE-2025-54370PhpSpreadsheet vulnerable to SSRF when reading and displaying a processed HTML document in the browser34Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Packagist:phpoffice/phpspreadsheet | 1.29.1 | Package registry (OSV) |
| Packagist:phpoffice/phpspreadsheet | 2.1.1 | Package registry (OSV) |
| Packagist:phpoffice/phpspreadsheet | 2.3.0 | Package registry (OSV) |
Exploit status
Proof of concept available
A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.
Evidence
- Nuclei detection template ×1
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Nuclei detection template | Nuclei template CVE-2024-45293 | — |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
- CVE-2024-4787342 days apartPhpSpreadsheet XmlScanner bypass leads to XXE30Monitor
- CVE-2024-4891742 days apartXXE in PHPSpreadsheet's XLSX reader30Monitor
- CVE-2024-4504840 days apartXML External Entity Reference (XXE) in PHPSpreadsheet26Monitor
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- none
- Availability
- none
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- None
- Availability impact
- None
Weakness class (CWE)
CWE-611 · Improper Restriction of XML External Entity ReferenceCVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
ATT&CK techniques
—
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →