XML External Entity Reference (XXE) in PHPSpreadsheet's XLSX reader
Published Oct 7, 2024
8.7
HIGHCVSS 4.0
EPSS 2.78%
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.
Affected products
-
- Version < 1.29.1StatusaffectedConstraints-
- Version >= 2.0.0, < 2.1.1StatusaffectedConstraints-
- Version >= 2.2.0, < 2.3.0StatusaffectedConstraints-
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PHPOffice | PhpSpreadsheet | n/a |
|
- < 1.29.1
- ≥ 2.0.0 · < 2.1.1
- ≥ 2.2.0 · < 2.3.0
-
- Version 0StatusaffectedConstraints<1.29.1
- Version 2.0.0StatusaffectedConstraints<2.1.1
- Version 2.2.0StatusaffectedConstraints<2.3.0
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Phpoffice | Phpspreadsheet | n/a |
|
No Red Hat product state for this CVE.
No package ranges for this CVE.
Remediation
No remediation recorded yet.
Metrics
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
No CVSS v3.0 score for this CVE.
No CVSS v2.0 score for this CVE.
This CVE is not in the KEV list.
CISA SSVC (Vulnrichment)
Stakeholder-Specific Vulnerability Categorization from CISA ADP.
Exploitation
PoCAutomatable
YesTechnical Impact
PartialDecision
n/aAssessed Oct 7, 2024 · SSVC 2.0.3
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 3, 2026.
Score over time
2024–2026- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (21 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 3, 2026 | 2.78% (0.02776) | 85.88th | v5 (v2026.06.15) |
| Jun 15, 2026 | 2.86% (0.02859) | 84.88th | v5 (v2026.06.15) |
| May 12, 2026 | 71.63% (0.71632) | 98.75th | v4 (v2025.03.14) |
| Apr 29, 2026 | 70.31% (0.70311) | 98.69th | v4 (v2025.03.14) |
| Feb 26, 2026 | 71.63% (0.71632) | 98.70th | v4 (v2025.03.14) |
| Feb 13, 2026 | 66.83% (0.66830) | 98.50th | v4 (v2025.03.14) |
| Nov 30, 2025 | 65.32% (0.65316) | 98.39th | v4 (v2025.03.14) |
| Nov 21, 2025 | 66.83% (0.66826) | 98.46th | v4 (v2025.03.14) |
| Nov 18, 2025 | 16.47% (0.16467) | 94.35th | v4 (v2025.03.14) |
| Nov 15, 2025 | 66.83% (0.66826) | 98.47th | v4 (v2025.03.14) |
| Apr 15, 2025 | 21.47% (0.21472) | 95.29th | v4 (v2025.03.14) |
| Mar 30, 2025 | 16.47% (0.16467) | 94.32th | v4 (v2025.03.14) |
| Mar 29, 2025 | 61.26% (0.61261) | 97.59th | v4 (v2025.03.14) |
| Mar 28, 2025 | 16.47% (0.16467) | 94.33th | v4 (v2025.03.14) |
| Mar 24, 2025 | 9.86% (0.09861) | 92.24th | v4 (v2025.03.14) |
| Mar 23, 2025 | 16.47% (0.16467) | 94.03th | v4 (v2025.03.14) |
| Mar 18, 2025 | 9.86% (0.09861) | 92.45th | v4 (v2025.03.14) |
| Mar 17, 2025 | 16.47% (0.16467) | 94.37th | v4 (v2025.03.14) |
| Mar 8, 2025 | 1.34% (0.01336) | 86.18th | v3 (v2023.03.01) |
| Dec 12, 2024 | 0.05% (0.00053) | 23.38th | v3 (v2023.03.01) |
| Oct 8, 2024 | 0.04% (0.00043) | 9.66th | v3 (v2023.03.01) |
References (6)
- https://github.com/PHPOffice/PhpSpreadsheet/commit/3bcd51826b7f089d1641e756c83030c30c3bdb0c
- https://github.com/PHPOffice/PhpSpreadsheet/commit/7d6cb09f6e8204f65e6dd5a0490f7f45f44bb331
- https://github.com/PHPOffice/PhpSpreadsheet/commit/949ff63e1f6413e6485f73af012d506aa81384bf
- https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-6hwr-6v2f-3m88 x_refsource_CONFIRMExploitVendor Advisory
- https://github.com/advisories/GHSA-6hwr-6v2f-3m88 Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2024-45293
Change history (0)
No recorded changes yet.