CVE-2026-59931PhpSpreadsheet: SSRF bypass via HTTP redirect in WEBSERVICE() domain whitelist
- 7.7HighCVSS base score
- 0.47%Exploitation in 30 daysEPSS · top 58% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- YesPublic exploitsa reference or SSVC says so
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. A reference of the record is tagged as an exploit. CISA's SSVC rates its exploitation: a proof of concept is public.
Show the exploits1
References tagged exploit1 reference
- https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-6hq5-7373-42rg (opens in a new tab)x_refsource_CONFIRMexploit
Timeline
ID reserved
By GitHub_M
- 21 days later
· 21 days later
Published
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High7.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N |
| NVDNVD · Deferred | 3.1 | High7.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N |
- EPSS (exploitation in 30 days)
- 0.47% · top 58% of all CVEs (18 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.7.
Affected products
- affected >= 4.0.0, < 5.8.1
- affected >= 3.3.0, < 3.10.7
- affected >= 2.2.0, < 2.4.7
- affected >= 2.0.0, < 2.1.18
- affected < 1.30.6
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagistphpoffice/phpspreadsheetGHSA-6hq5-7373-42rg (opens in a new tab)
References
References7
- https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-6hq5-7373-42rg (opens in a new tab)x_refsource_CONFIRMexploit
- https://github.com/PHPOffice/PhpSpreadsheet/commit/7ef7b25e8548a6ded79dac74e2e2c7acdac38d8d (opens in a new tab)x_refsource_MISC
- https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/1.30.6 (opens in a new tab)x_refsource_MISC
- https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/2.1.18 (opens in a new tab)x_refsource_MISC
- https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/2.4.7 (opens in a new tab)x_refsource_MISC
- https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/3.10.7 (opens in a new tab)x_refsource_MISC
- https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/5.8.1 (opens in a new tab)x_refsource_MISC
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2026-49929 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-6hq5-7373-42rg (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2026-59931)Record last updated .