Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. phpoffice/phpexcel
  4. ›
  5. CVE-2024-45291

CVE-2024-45291: PhpSpreadsheet allows absolute path traversal and Server-Side Request Forgery in HTML writer when embedding images is enabled

October 7, 2024 (updated March 6, 2025)

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.

References

  • github.com/PHPOffice/PhpSpreadsheet
  • github.com/PHPOffice/PhpSpreadsheet/commit/a9693d1182df6695c14bc5d74315ac71a3398e5a
  • github.com/PHPOffice/PhpSpreadsheet/commit/d95bc290beb137d4118095b96f62ec47e0205cec
  • github.com/PHPOffice/PhpSpreadsheet/commit/e04ed222b36fd5fd6fed0c10c765c2b68effb465
  • github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-w9xv-qf98-ccq4
  • github.com/advisories/GHSA-w9xv-qf98-ccq4
  • nvd.nist.gov/vuln/detail/CVE-2024-45291

Code Behaviors & Features

Detect and mitigate CVE-2024-45291 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 1.8.2

Solution

Unfortunately, there is no solution available yet.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-36: Absolute Path Traversal
  • CWE-918: Server-Side Request Forgery (SSRF)

Source file

packagist/phpoffice/phpexcel/CVE-2024-45291.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:52 +0000.