critical CVSS 9.8

CVE-2026-34084·PHP vulnerability

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.

Severity
critical
Software
PHP
Fixed in
5.6.0
Published
2026-05-05

Affected versions

From: 4.0.0

Until: 5.6.0

Fixed in: 5.6.0

How to fix this CVE

Update PHP and PhpSpreadsheet to patch a critical deserialization vulnerability that allows remote code execution through crafted stream wrapper paths in file loading functions. Applications using PhpSpreadsheet versions 4.0.0 through 5.5.0 must upgrade to version 5.6.0 or later immediately. Additionally, implement input validation to reject user-supplied filenames containing stream wrapper protocols (phar://, ftp://, ssh2.sftp://, etc.) before passing them to IOFactory::load().

sudo dnf update php

Defensia detects this vulnerability

What an exploitation attempt looks like

Sample log line indicative of exploitation attempts:

POST|GET request containing IOFactory::load parameter with values matching (phar://|ftp://|ssh2\.sftp://) followed by file paths; or error messages indicating unserialization attempts from PHAR metadata; or exceptions from stream wrapper protocol handlers in PHP logs

WAF mitigation (if patching is not yet possible)

Add this rule to your WAF to block exploitation attempts while you schedule the patch.

Block HTTP requests containing stream wrapper protocol schemes (phar://, ftp://, ssh2.sftp://, etc.) in parameters commonly used for file upload or file path operations. Implement strict input validation rules that reject any filename parameter containing '://' unless explicitly whitelisted.

How to check if you are affected

  1. Check the installed version of PhpSpreadsheet by running: grep -r 'VERSION\|version' /vendor/phpoffice/phpspreadsheet/composer.json or php -r "require 'vendor/autoload.php'; echo \\PhpOffice\\PhpSpreadsheet\\Spreadsheet::VERSION;"
  2. Identify all code locations calling IOFactory::load() with user-controlled input by running: grep -r "IOFactory::load" /app/src --include="*.php" | grep -E "\$_GET|\$_POST|\$_REQUEST|\$_FILES"
  3. Search application logs for attempts to load phar://, ftp://, or ssh2.sftp:// URLs by running: grep -E "(phar://|ftp://|ssh2\.sftp://)" /var/log/php-errors.log /var/log/apache2/error.log
  4. Verify the patch by checking the PhpSpreadsheet version is 5.6.0 or higher and confirm no stream wrapper protocols are accepted in file loading functions

FAQ

What is CVE-2026-34084?

This is a critical remote code execution vulnerability in PhpSpreadsheet library where an attacker can bypass file path validation and supply malicious PHP stream wrapper URLs (phar://, ftp://, ssh2.sftp://) to trigger unsafe deserialization and code execution. The vulnerability affects versions 4.0.0 through 5.5.0.

Is CVE-2026-34084 being actively exploited?

According to CISA, this vulnerability is not currently listed in the Known Exploited Vulnerabilities catalog, and no public exploits have been publicly disclosed, but the critical CVSS score of 9.8 warrants immediate patching.

What versions of PHP are affected by CVE-2026-34084?

The vulnerability affects PhpSpreadsheet library versions 4.0.0 through 5.5.0 (and legacy branches 1.30.2 and earlier, 2.0.0-2.1.14, 2.2.0-2.4.3, 3.3.0-3.10.3). Any PHP application using these versions is vulnerable regardless of PHP engine version.

How do I check if my server is vulnerable to CVE-2026-34084?

Run 'composer show phpoffice/phpspreadsheet' in your application directory to check the installed version. If it's between 4.0.0 and 5.5.0, your application is vulnerable. Also verify whether user input is directly passed to IOFactory::load() without validation.

Does Defensia detect CVE-2026-34084?

Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PhpSpreadsheet is present in your application dependencies, CVE-2026-34084 will appear in your dashboard with remediation steps.

Related PHP CVEs

CVE-2025-25174CVSS 10Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') vulnerability in beeteam368 BeeTeam368 Extensions beeteam368-extensions allows PHP Local File Inclusion.This issue affects BeeTeam368 Extensions: from n/a through <= 1.9.4.
CVE-2025-46348CVSS 10YesWiki is a wiki system written in PHP. Prior to version 4.5.4, the request to commence a site backup can be performed and downloaded without authentication. The archives are created with a predictable filename, so a malicious user could create and download an archive without being authenticated. This could result in a malicious attacker making numerous requests to create archives and fill up the file system, or by downloading the archive which contains sensitive site information. This issue has been patched in version 4.5.4.
CVE-2026-39337CVSS 10ChurchCRM is an open-source church management system. Prior to 7.1.0, critical pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The "$dbPassword" variable is not sanitized. This vulnerability exists due to an incomplete fix for CVE-2025-62521. This vulnerability is fixed in 7.1.0.
CVE-2025-62521CVSS 10ChurchCRM is an open-source church management system. Prior to version 5.21.0, a pre-authentication remote code execution vulnerability in ChurchCRM's setup wizard allows unauthenticated attackers to inject arbitrary PHP code during the initial installation process, leading to complete server compromise. The vulnerability exists in `setup/routes/setup.php` where user input from the setup form is directly concatenated into a PHP configuration template without any validation or sanitization. Any parameter in the setup form can be used to inject PHP code that gets written to `Include/Config.php`, which is then executed on every page load. This is more severe than typical authenticated RCE vulnerabilities because it requires no credentials and affects the installation process that administrators must complete. Version 5.21.0 patches the issue.
CVE-2024-5932CVSS 10The GiveWP – Donation Plugin and Fundraising Platform plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 3.14.1 via deserialization of untrusted input from the 'give_title' parameter. This makes it possible for unauthenticated attackers to inject a PHP Object. The additional presence of a POP chain allows attackers to execute code remotely, and to delete arbitrary files.

References

Track CVEs across your fleet automatically

Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-34084. Free for 1 server.

Get started free