CVE-2024-45048 XML External Entity Reference (XXE) in PHPSpreadsheet

High 8.8 Published Updated

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.

PackageAffectedFixed in
phpoffice/phpspreadsheet PackagistAll versions1.29.1
phpoffice/phpspreadsheet PackagistAll versions1.29.1
phpoffice/phpspreadsheet PackagistFrom 2.0.02.1.1
phpoffice/phpspreadsheet PackagistFrom 2.0.02.1.1
phpoffice/phpspreadsheet PackagistFrom 2.2.02.2.1
phpoffice/phpspreadsheet PackagistFrom 2.2.02.2.1
2 more packages
phpoffice/phpexcel PackagistAll versions to 1.8.2None
phpoffice/phpexcel PackagistAll versions to 1.8.2None

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.

Sources

Also known as GHSA-ghg6-32f9-2jp7.

Is CVE-2024-45048 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free