Server-side Request Forgery (SSRF) Affecting phpoffice/phpspreadsheet package, versions <1.30.6>=2.0.0, <2.1.18>=2.2.0, <2.4.7>=3.3.0, <3.10.7>=4.0.0, <5.8.1


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.53% (42nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PHP-PHPOFFICEPHPSPREADSHEET-18307195
  • published25 Jul 2026
  • disclosed23 Jul 2026
  • creditUnknown

Introduced: 23 Jul 2026

CVE-2026-59931  (opens in a new tab)
CWE-918  (opens in a new tab)

How to fix?

Upgrade phpoffice/phpspreadsheet to version 1.30.6, 2.1.18, 2.4.7, 3.10.7, 5.8.1 or higher.

Overview

phpoffice/phpspreadsheet is a Spreadsheet engine that Read, Create and Write Spreadsheet documents in PHP .

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) in the webService process. An attacker can access internal services and exfiltrate sensitive data by uploading a crafted XLSX file containing a formula that triggers an HTTP redirect from a whitelisted domain to an internal or arbitrary target. This is only exploitable if the application uses a domain whitelist and processes user-uploaded spreadsheets with calculated values.

Workaround

This vulnerability can be mitigated by disabling HTTP redirect following in the stream context or by manually validating each redirect target against the domain whitelist.

CVSS Base Scores

version 4.0
version 3.1