# CVE-2024-45291: Path traversal and Server-Side Request Forgery in HTML writer when embedding images is enabled in PHPSpreadsheet

- Severity: Medium 6.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.86%, higher than 59% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-10-07T15:58:06.000Z
- Modified: 2026-06-17T07:53:57.777Z
- Also known as: GHSA-w9xv-qf98-ccq4
- Related: CVE-2024-45290
- Weaknesses: CWE-22, CWE-36, CWE-918
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- PHPOffice PhpSpreadsheet: < 1.29.2; >= 2.0.0, < 2.1.1; >= 2.2.0, < 2.3.0; before 1.29.2; from 2.0.0 before 2.1.1; from 2.2.0 before 2.3.0
- phpoffice/phpspreadsheet (Packagist): from 2.2.0 before 2.3.0; before 1.29.2; from 2.0.0 before 2.1.1
- phpoffice/phpexcel (Packagist): up to 1.8.2

## Every score

- GitHub_M: CVSS:3.1 6.3 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N`
- GitHub: CVSS:3.1 6.3 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N`
- NVD: 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`

## References

- <https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-w9xv-qf98-ccq4> (exploit, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-45291> (advisory)
- <https://github.com/PHPOffice/PhpSpreadsheet/commit/a9693d1182df6695c14bc5d74315ac71a3398e5a> (web)
- <https://github.com/PHPOffice/PhpSpreadsheet/commit/d95bc290beb137d4118095b96f62ec47e0205cec> (web)
- <https://github.com/PHPOffice/PhpSpreadsheet/commit/e04ed222b36fd5fd6fed0c10c765c2b68effb465> (web)
- <https://github.com/PHPOffice/PhpSpreadsheet> (package)

## Sources

- CVE List: [CVE-2024-45291](https://www.cve.org/CVERecord?id=CVE-2024-45291), CVE Terms of Use, modified 2024-10-08
- GitHub Advisory Database: [GHSA-w9xv-qf98-ccq4](https://github.com/advisories/GHSA-w9xv-qf98-ccq4), CC-BY-4.0, modified 2026-02-04
- NVD: [CVE-2024-45291](https://nvd.nist.gov/vuln/detail/CVE-2024-45291), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-45291 · Whole record: https://cve.day/CVE-2024-45291.json · Rebuilt by cve.day 2026-11-25T22:58:46.147Z
