CVE-2024-45048 XML External Entity Reference (XXE) in PHPSpreadsheet
An XXE vulnerability in PHPSpreadsheet allows attackers to read local files by bypassing input filters, requiring an upgrade to the latest version.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2024-45048?
CVE-2024-45048 is a high-severity vulnerability in PHPOffice PhpSpreadsheet, published on 28 Aug 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Affected versions are subject to a bypassing of a filter which allows for an XXE-attack. This in turn allows attacker to obtain contents of local files, even if error reporting is muted. This vulnerability has been addressed in release version 2.2.1. All users are advised to upgrade. There are no known workarounds for this vulnerability.
Weakness: CWE-611
Which versions are affected by CVE-2024-45048?
8 open source packages ship an affected version, including phpoffice/phpspreadsheet and phpoffice/phpexcel. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
phpoffice/phpspreadsheet Packagist | All versions | 1.29.1 |
phpoffice/phpspreadsheet Packagist | All versions | 1.29.1 |
phpoffice/phpspreadsheet Packagist | From 2.0.0 | 2.1.1 |
phpoffice/phpspreadsheet Packagist | From 2.0.0 | 2.1.1 |
phpoffice/phpspreadsheet Packagist | From 2.2.0 | 2.2.1 |
phpoffice/phpspreadsheet Packagist | From 2.2.0 | 2.2.1 |
2 more packages
phpoffice/phpexcel Packagist | All versions to 1.8.2 | None |
phpoffice/phpexcel Packagist | All versions to 1.8.2 | None |
Products include Phpoffice Phpspreadsheet.
How do I fix CVE-2024-45048?
Upgrade phpoffice/phpspreadsheet to a fixed version for your release line: 1.29.1, 2.1.1 or 2.2.1.
Is CVE-2024-45048 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-45048 exists.
Other vulnerabilities in PHPOffice PhpSpreadsheet
- CVE-2026-34084 PhpSpreadsheet SSRF and RCE via PHP stream wrappers in IOFactory::load
- CVE-2019-12331 XXE in PHPSpreadsheet due to incomplete fix for previous encoding issue
- CVE-2018-19277 XXE in PHPSpreadsheet due to encoding issue
- CVE-2024-56365 PhpSpreadsheet vulnerable to unauthorized reflected XSS in the constructor of the Downloader class
- CVE-2024-56366 PhpSpreadsheet vulnerable to unauthorized reflected XSS in the Accounting.php file
Sources
Also known as GHSA-ghg6-32f9-2jp7.