CVE-2026-59931 Details
Description
PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. In versions 4.0.0 through 5.8.0, 3.3.0 through 3.10.6, 2.2.0 through 2.4.6, 2.0.0 through 2.1.17, and all releases up to and including 1.30.5, the WEBSERVICE() domain whitelist can be bypassed via an HTTP redirect (SSRF). In Calculation/Web/Service.php, the webService() method validates a URL's host against the whitelist set via Spreadsheet::setDomainWhiteList(), then fetches content with file_get_contents($url, false, $ctx); because PHP's HTTP stream wrapper follows 301/302 redirects automatically (up to 20 hops) and the redirect target is never re-validated, an attacker who can trigger a redirect from a whitelisted domain can reach arbitrary URLs, including internal addresses. An attacker able to upload XLSX files to an application that uses setDomainWhiteList() and getCalculatedValue() can achieve a full-read SSRF, returning up to 32,767 bytes of the response body as a cell's calculated value, which enables exfiltration of cloud metadata (AWS/GCP/Azure credentials via http://169.254.169.254/), access to internal-only services, and internal port scanning (the port is not validated). This issue has been fixed in versions 5.8.1, 3.10.7, 2.4.7, 2.1.18, and 1.30.6.
A server-side request forgery (SSRF) vulnerability has been identified in PhpSpreadsheet, a PHP library for reading and writing spreadsheet files. This issue affects versions 4.0.0 through 5.8.0, 3.3.0 through 3.10.6, 2.2.0 through 2.4.6, 2.0.0 through 2.1.17, and all releases up to and including 1.30.5. The vulnerability arises from the WEBSERVICE() function's domain whitelist, which can be bypassed through HTTP redirects. The webService() method initially validates a URL's host against a user-defined whitelist, but then fetches the content using file_get_contents(). PHP's HTTP stream wrapper automatically follows redirects (up to 20 hops) without re-validating the target URL. This allows an attacker to access arbitrary URLs, including internal addresses, by triggering a redirect from a whitelisted domain. Exploitation is possible by uploading an XLSX file containing a crafted WEBSERVICE formula that exploits this redirect behavior.
Users can update to PhpSpreadsheet versions 5.8.1, 3.10.7, 2.4.7, 2.1.18, or 1.30.6, all of which include the necessary fix.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 28, 2026CISA-ADP
Assessed Jul 28, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-6hq5-7373-42rg | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://github.com/PHPOffice/PhpSpreadsheet/commit/7ef7b25e8548a6ded79dac74e2e2c7acdac38d8d | [email protected] | Source CodeVendor |
| https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/1.30.6 | [email protected] | Release NotesVendor |
| https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/2.1.18 | [email protected] | Release NotesVendor |
| https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/2.4.7 | [email protected] | Release NotesVendor |
| https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/3.10.7 | [email protected] | Release NotesVendor |
| https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/5.8.1 | [email protected] | Release NotesVendor |
| https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-6hq5-7373-42rg | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-918 | Server-Side Request Forgery (SSRF) | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| PHPOffice PhpSpreadsheet | >= 4.0.0, <= 5.8.0 (semver) >= 3.3.0, <= 3.10.6 (semver) >= 2.2.0, <= 2.4.6 (semver) >= 2.0.0, <= 2.1.17 (semver) <= 1.30.5 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 28, 2026 | CVE Modified | CISA-ADP |
| Jul 28, 2026 | New CVE Received | [email protected] |
Volerion