PhpSpreadsheet XmlScanner bypass leads to XXE
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.
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 help- Published
- Nov 18, 2024
- Updated
- Jun 17, 2026
- EPSS
- 0.7% · 53th 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
30
Monitor
Low priority for now.
- CVSS
- 30 / 40 · 7.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.7%
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.
Affected 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.4
- phpoffice phpspreadsheet2.0.0 and later · before 2.1.3
- phpoffice phpspreadsheet2.2.0 and later · before 2.3.2
- phpoffice phpspreadsheet3.3.0 and later · before 3.4.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
- < 1.29.4, >= 2.0.0, < 2.1.3, >= 2.2.0, < 2.3.2, >= 3.3.0, < 3.4.0affected
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.3 | 2.1.3 |
| Packagist | phpoffice/phpspreadsheet | from 2.2.0 · before 2.3.2 | 2.3.2 |
| Packagist | phpoffice/phpspreadsheet | from 3.3.0 · before 3.4.0 | 3.4.0 |
| Packagist | phpoffice/phpspreadsheet | before 1.29.4 | 1.29.4 |
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.4 | Package registry (OSV) |
| Packagist:phpoffice/phpspreadsheet | 2.1.3 | Package registry (OSV) |
| Packagist:phpoffice/phpspreadsheet | 2.3.2 | Package registry (OSV) |
| Packagist:phpoffice/phpspreadsheet | 3.4.0 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
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-4529342 days apartXML External Entity Reference (XXE) in PHPSpreadsheet's XLSX reader31Monitor
- CVE-2024-489170 days apartXXE in PHPSpreadsheet's XLSX reader30Monitor
- CVE-2024-4504882 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. →
References
- github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php
- owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing
- www.w3.org/TR/xml/#sec-guessing-no-ext-info
Vendor advisories and official records. Exploit/PoC links are deliberately left out.