phpoffice/phpspreadsheet security advisory
CVE-2026-34084: PhpSpreadsheet has SSRF/RCE in IOFactory::load when $filename is user controlled
CVE-2026-34084 is a critical-severity remote code execution vulnerability in the PHP package phpoffice/phpspreadsheet (CVSS 9.8), published 5 May 2026. The advisory does not name a fixed version. It can be exploited without an account.
critical 9.8 published 2026-05-05 · updated 2026-07-24
- Affected versions
- <= 1.30.2
>= 2.0.0, <= 2.1.14
>= 2.2.0, <= 2.4.3
>= 3.3.0, <= 3.10.3
>= 4.0.0, <= 5.5.0 - Fixed in
- not stated
- Newest release
- 5.10.0
- Severity
- Critical · CVSS 9.8
- Type
- Remote code execution
CWE-502, CWE-918 - Exploited in the wild
- Not on the CISA KEV list
checked 2026-11-04
Is your phpoffice/phpspreadsheet version affected?
Who can exploit CVE-2026-34084
- Access: No account. Anyone who can send a request to an app that uses the affected code.
CVSS vector (scored by NVD): CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
How to fix CVE-2026-34084 in phpoffice/phpspreadsheet
- Find the installed version:
composer show phpoffice/phpspreadsheet. If you never required it yourself,composer why phpoffice/phpspreadsheetshows which package pulls it in. - Update it:
composer update phpoffice/phpspreadsheet --with-all-dependencies. - If Composer will not go that high, your composer.json constraint is holding it back. Widen it (for example
"phpoffice/phpspreadsheet": "^5.10.0"if you can take that version), or upgrade the package that requires it. - Run
composer audit. It reads the same advisory data and should no longer list CVE-2026-34084. - Commit composer.lock and deploy it. On the server, run
composer install --no-devfrom the lock file, notcomposer update.
If you cannot upgrade yet
- Never pass user-controlled data to unserialize() or to template rendering, and restrict who can edit templates or settings.
- Put a web application firewall in front of the app and watch for new PHP files or admin users.
- If your app does not use the affected feature, note that in your audit, but still plan the upgrade.
The CVE-2026-34084 advisory
PhpSpreadsheet is a library for reading and writing spreadsheet files. In versions 1.30.2 and earlier, 2.0.0 through 2.1.14, 2.2.0 through 2.4.3, 3.3.0 through 3.10.3, and 4.0.0 through 5.5.0, when the filename argument to IOFactory::load() is user-controlled, an attacker can supply a PHP stream wrapper path (such as phar://, ftp://, or ssh2.sftp://) that passes the is_file() check in File::assertFile(). The phar:// wrapper triggers deserialization of the PHAR metadata, which can lead to remote code execution if a suitable gadget chain is available in the application. The ftp:// and ssh2.sftp:// wrappers can be used for server-side request forgery. This issue has been fixed in versions 1.30.3, 2.1.15, 2.4.4, 3.10.4, and 5.6.0.
References
- GitHub advisory GHSA-q4q6-r8wh-5cgh github.com
Other phpoffice/phpspreadsheet advisories
- medium CVE-2026-108360: PhpSpreadsheet: SSRF whitelist bypass via unre-validated HTTP redirect in Drawing::setPath external image loading 2026-10-27
- high CVE-2026-108359: PhpSpreadsheet ODS Reader: Unbounded number-rows-repeated → CPU & Memory Exhaustion (DoS) 2026-10-27
- high CVE-2026-108358: PhpSpreadsheet: XmlScanner Bypass via ISO-2022 Escape Sequences Allows XXE and Denial of Service 2026-10-27
- high CVE-2026-108357: PhpSpreadsheet: XmlScanner Bypass via Double-Encoded unentity() TOCTOU Allows XXE and Denial of Service 2026-10-27
- high CVE-2026-59933: PHPSpreadsheet: XLS/OLE sector-chain self-loop causes memory exhaustion 2026-07-23
- high CVE-2026-59932: PHPSpreadsheet: Gnumeric reader unbounded gzip expansion causes memory exhaustion 2026-07-23
Related
Need help patching or upgrading? Laskyr does PHP and Laravel security fixes and upgrades. Tell us what you run and we reply with a plan and a price.
Ask about a fixWhere this data comes from
- Affected and fixed versions: the Packagist security advisories API (GitHub Advisory Database and FriendsOfPHP), the same data
composer audituses. Synced 2026-11-03. - Description, score, weakness and references: NIST National Vulnerability Database (NVD), checked 2026-11-04. This product uses data from the NVD API but is not endorsed or certified by the NVD.
- Exploited-in-the-wild status: the CISA Known Exploited Vulnerabilities catalog, checked 2026-11-04.
- Compiled by Daniel Lasek at Laskyr from the sources above. The summary, “who can exploit it”, “how to fix it” and hardening sections are our plain-English reading of the record and are generated from it. The quoted description is the record's own text. Spot an error? Tell us.