cve.bz

CVE-2024-45291 phpoffice phpspreadsheet: Path traversal

8.8 highExploit referenceEPSS 0.9%Fix available

High (8.8) in phpoffice phpspreadsheet. EPSS 0.9% estimated probability of exploitation activity in the next 30 days. Fixed in phpoffice/phpspreadsheet 1.29.2, 2.1.1, 2.3.0.

On this page
PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. It's possible for an attacker to construct an XLSX file that links images from arbitrary paths. When embedding images has been enabled in HTML writer with `$writer->setEmbedImages(true);` those files will be included in the output as `data:` URLs, regardless of the file's type. Also URLs can be used for embedding, resulting in a Server-Side Request Forgery vulnerability. When embedding images has been enabled, an attacker can read arbitrary files on the server and perform arbitrary HTTP GET requests. Note that any PHP protocol wrappers can be used, meaning that if for example the `expect://` wrapper is enabled, also remote code execution is possible. This issue has been addressed in release versions 1.29.2, 2.1.1, and 2.3.0. All users are advised to upgrade. there are no known workarounds for this vulnerability.

Severity

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.9% (unchanged from 0.9% a week ago; 0.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 60th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2024-10-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
CWE-918 Server-Side Request Forgery (SSRF)
CWE-36 Absolute Path Traversal
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

  • phpoffice/phpspreadsheet (Packagist): fixed in 2.3.0, 1.29.2, 2.1.1

Ask an AI about this CVE

Show the promptExplain CVE-2024-45291 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-45291?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-45291?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-45291 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
phpoffice:phpspreadsheetbefore 1.29.2
phpoffice:phpspreadsheetfrom 2.0.0 before 2.1.1
phpoffice:phpspreadsheetfrom 2.2.0 before 2.3.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-w9xv-qf98-ccq4Packagistphpoffice/phpspreadsheet>=2.2.0 <2.3.02.3.0
GHSA-w9xv-qf98-ccq4Packagistphpoffice/phpspreadsheet<1.29.21.29.2
GHSA-w9xv-qf98-ccq4Packagistphpoffice/phpspreadsheet>=2.0.0 <2.1.12.1.1
GHSA-w9xv-qf98-ccq4Packagistphpoffice/phpexcel<=1.8.2no fix published

Attack patterns (CAPEC)

  • CAPEC-664 Server Side Request Forgery Likelihood: High · Severity: High
  • CAPEC-597 Absolute Path Traversal
  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON