Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. phpoffice/phpspreadsheet
  4. ›
  5. CVE-2026-59931

CVE-2026-59931: PHPSpreadsheet: SSRF bypass via HTTP redirect in WEBSERVICE() domain whitelist

July 23, 2026

The domain whitelist introduced in PhpSpreadsheet 5.4.0 for the WEBSERVICE() formula function can be bypassed via HTTP redirect. The whitelist validates only the initial URL’s hostname, but file_get_contents() follows 302/301 redirects by default without re-validating the redirect target against the whitelist. This allows an attacker to reach internal services through a whitelisted domain that issues an HTTP redirect.

References

  • github.com/PHPOffice/PhpSpreadsheet/commit/7ef7b25e8548a6ded79dac74e2e2c7acdac38d8d
  • github.com/PHPOffice/PhpSpreadsheet/releases/tag/1.30.6
  • github.com/PHPOffice/PhpSpreadsheet/releases/tag/2.1.18
  • github.com/PHPOffice/PhpSpreadsheet/releases/tag/2.4.7
  • github.com/PHPOffice/PhpSpreadsheet/releases/tag/3.10.7
  • github.com/PHPOffice/PhpSpreadsheet/releases/tag/5.8.1
  • github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-6hq5-7373-42rg
  • github.com/advisories/GHSA-6hq5-7373-42rg
  • nvd.nist.gov/vuln/detail/CVE-2026-59931

Code Behaviors & Features

Detect and mitigate CVE-2026-59931 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.30.6, all versions starting from 2.0.0 before 2.1.18, all versions starting from 2.2.0 before 2.4.7, all versions starting from 3.3.0 before 3.10.7, all versions starting from 4.0.0 before 5.8.1

Fixed versions

  • 1.30.6
  • 2.1.18
  • 2.4.7
  • 3.10.7
  • 5.8.1

Solution

Upgrade to versions 1.30.6, 2.1.18, 2.4.7, 3.10.7, 5.8.1 or above.

Impact 7.7 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-918: Server-Side Request Forgery (SSRF)

Source file

packagist/phpoffice/phpspreadsheet/CVE-2026-59931.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:19:01 +0000.