Vulnerability · Published Aug 25, 2025 · Assigned by GitHub_M
CVE-2025-54370PhpSpreadsheet vulnerable to SSRF when reading and displaying a processed HTML document in the browser
High 8.7
In plain English
A high-severity server-side request forgery in PhpSpreadsheet from PHPOffice. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 57% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
PhpOffice/PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Prior to versions 1.30.0, 2.1.12, 2.4.0, 3.10.0, and 5.0.0, SSRF can occur when a processed HTML document is read and displayed in the browser. The vulnerability lies in the setPath method of the PhpOffice\PhpSpreadsheet\Worksheet\Drawing class, where a crafted string from the user is passed to the HTML reader. This issue has been patched in versions 1.30.0, 2.1.12, 2.4.0, 3.10.0, and 5.0.0.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Packagist | phpoffice/phpspreadsheet | 1.30.0 | GHSA-rx7m-68vc-ppxh |
| Packagist | phpoffice/phpspreadsheet | 2.1.12 | GHSA-rx7m-68vc-ppxh |
| Packagist | phpoffice/phpspreadsheet | 2.4.0 | GHSA-rx7m-68vc-ppxh |
| Packagist | phpoffice/phpspreadsheet | 3.10.0 | GHSA-rx7m-68vc-ppxh |
| Packagist | phpoffice/phpspreadsheet | 5.0.0 | GHSA-rx7m-68vc-ppxh |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| PHPOffice | PhpSpreadsheet | < 1.30.0>= 2.0.0, < 2.1.12>= 2.2.0, < 2.4.0>= 3.0.0, < 3.10.0>= 4.0.0, < 5.0.0 |
Weakness: CWE-918 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
References
- https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-rx7m-68vc-ppxh x_refsource_CONFIRM
- https://github.com/PHPOffice/PhpSpreadsheet/commit/334a67797ace574d1d37c0992ffe283b7415471a x_refsource_MISC
- https://github.com/PHPOffice/PhpSpreadsheet/commit/4050f14521d70634c3320b170236574a6106eb39 x_refsource_MISC
- https://github.com/PHPOffice/PhpSpreadsheet/commit/81a0de2261f698404587a6421a5c6eb263c40b31 x_refsource_MISC
- https://github.com/PHPOffice/PhpSpreadsheet/commit/ac4befd2f7ccc21a59daef606a02a3d1828ade09 x_refsource_MISC
- https://github.com/PHPOffice/PhpSpreadsheet/commit/c2cd0e64392438e4c6af082796eb65c1d629a266 x_refsource_MISC