NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐘
🐘 Packagist
Not in CISA KEV
HIGH severity

CVE-2024-45293 — phpspreadsheet

HIGHFix: PHPOffice/PhpSpreadsheet@3bcd518

CVE-2024-45293 is a high-severity (CVSS 7.5) XML External Entity (XXE) vulnerability in phpoffice/phpspreadsheet. A fix is available for phpoffice/phpspreadsheet — see the affected versions and patch details below.

XML External Entity Reference (XXE) in PHPSpreadsheet's XLSX reader

Also known asGHSA-6hwr-6v2f-3m88
Published
Updated
Affected
4 pkgs
Patched
3 / 4
Exploits
None indexed
Exploitation data as of Nov 3, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.

Exploitation and automatability from CISA’s SSVC triage for CVE-2024-45293.

EPSS Exploitation Probability

via FIRST.org ↗
2.8%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs86th percentile — riskier than 86% of all scored CVEsHighest risk
0.00%30.8%61.5%92.3%70.3%2.8%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

4 pkgs affected
🐘phpoffice/phpspreadsheet🐘phpoffice/phpspreadsheet🐘phpoffice/phpspreadsheet🐘phpoffice/phpexcel

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

Summary

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.

Details

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.

$patterns = [
           '/encoding="([^"]*]?)"/',
           "/encoding='([^']*?)'/",
];

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.

PoC

Needed:

  • An Excel sheet (XLSX) with at least one cell containing a value.

Unzip the excel sheet, and modify the xl/SharedStrings.xml file with the following value (note the space after encoding=):

<?xml version="1.0" encoding= 'UTF-7' standalone="yes"?>
+ADw-!DOCTYPE abc [ ... ]>

Step-by-step

  1. First off, the following string is encoded in base64:
<!ENTITY internal 'abc'  >" 

Resulting in:

PCFFTlRJVFkgaW50ZXJuYWwgJ2FiYycgID4K
  1. The string is used with a parameter entity and the PHP filter wrapper to ultimately define custom entities and call them within the XML.
<?xml version="1.0" encoding= 'UTF-7' standalone="yes"?>
+ADw-!DOCTYPE foo [ <!ENTITY % xxe SYSTEM "php://filter//resource=data://text/plain;base64,PCFFTlRJVFkgaW50ZXJuYWwgJ2FiYycgID4K" > %xxe;]>
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="1" uniqueCount="1"><si><t>&internal;</t></si></sst>

When this file is parsed by the library, the value abc should be in the original filled cell.

With the help of the PHP filter wrapper, this can be escalated to information disclosure/file read.

Impact

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.

Affected Packages

4 total 3 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistphpoffice/phpspreadsheet≥ 2.2.0&&< 2.3.02.3.0composer require phpoffice/phpspreadsheet:^2.3.0
🐘Packagistphpoffice/phpspreadsheetall versions1.29.1composer require phpoffice/phpspreadsheet:^1.29.1
🐘Packagistphpoffice/phpspreadsheet≥ 2.0.0&&< 2.1.12.1.1composer require phpoffice/phpspreadsheet:^2.1.1
🐘Packagistphpoffice/phpexcelall versionsNo fix

Affected Products

1 product · 3 configurations
Application
phpspreadsheetphpoffice
≥ 2.2.0 && < 2.3.0
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for phpoffice/phpspreadsheet, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update phpoffice/phpspreadsheet to 2.3.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-45293 is resolved across your whole dependency graph.

  3. Workarounds

    Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.

How to detect CVE-2024-45293

A community-maintained Nuclei template exists for this CVE. You can scan for it directly:

nuclei -id cve-2024-45293 -u https://target
Template
TablePress < 2.4.3 - XXE Injection
Severity
high
Impact
Successful exploitation could allow an attacker to read sensitive files on the server.
Remediation
Upgrade TablePress to version 2.4.3 or later to mitigate the vulnerability.

Template by ProjectDiscovery nuclei-templates (iamnoooob, ritikchaddha), MIT licensed. View the full template. Scan only systems you are authorised to test.

Frequently Asked Questions

### Summary 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. ### Details 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 whi
O3 Security · Impact-Aware SCA

Is CVE-2024-45293 in your dependencies?

Find it across Packagist, including transitive dependencies.

CVE-2024-45293: phpspreadsheet — Fixed in 2.3.0