Skip to main content
Public proof of conceptFix available

CVE-2024-45293

A public proof of concept exists; no exploitation attested.

  • Published2024-10-07
  • Fixed in2.3.0 · 2.1.1 · 1.29.1
  • WeaknessCWE-611

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2024-10-0720:15CVE publishedNVD

Versions per branch

NVD · CISA-ADP · OSV
Phpoffice phpspreadsheet
BranchAffectedFixed in
2.x≥ 2.2.0, < 2.3.02.3.0
2.x≥ 2.0.0, < 2.1.12.1.1
1.29< 1.29.11.29.1
phpoffice/phpexcel
BranchAffectedFixed in
1.8≤ 1.8.2no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • PHPOffice PhpSpreadsheet
    Affected
    • = >= 2.2.0, < 2.3.0no fix stated
    • = < 1.29.1no fix stated
    • = >= 2.0.0, < 2.1.1no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2024-10-07

Fix

  1. Update Phpoffice phpspreadsheet to 2.3.0 · 2.1.1 · 1.29.1

Advisories and patches

Detection

read 2026-11-19 10:48 UTC
Nuclei template
available
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Published
2024-10-07
Last Modified
2026-06-17
NVD status
Analyzed
GitHub Advisory
GHSA-6hwr-6v2f-3m88

Frequently asked questions

What is CVE-2024-45293?

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.

Is CVE-2024-45293 actively exploited?

A proof-of-concept exploit exists for CVE-2024-45293, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2024-45293?

CVE-2024-45293 has a CVSS v3 base score of 7.5 (HIGH severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.

Running phpoffice/phpspreadsheet? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record