CVE-2026-45034: PHPSpreadsheet Patch Bypass Leading to Remote Code Execution

phpoffice/phpspreadsheet Updated 09 Jun 2026

Summary

08/06/2026
Yes i
Critical
9.2

CVE-2026-45034: PHPSpreadsheet has a patch bypass for CVE-2026-34084. Affects phpoffice/phpspreadsheet versions < 1.30.5. Fixed in 1.30.5. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

PHPSpreadsheet is a widely used library for reading and writing spreadsheet files in PHP. It provides a range of features for handling various spreadsheet formats, making it a popular choice among developers. However, it has been found to have a critical vulnerability that allows attackers to bypass security measures and potentially execute arbitrary code.

Vulnerability Detail

The vulnerability arises from a flaw in the prohibitWrappers helper function, which is intended to prevent the use of stream wrappers like phar://. The function incorrectly relies on parse_url, which can return false for certain inputs, allowing attackers to exploit this bypass. When an attacker uses a specially crafted input, they can trigger the PHP stream layer to treat it as a valid phar wrapper, leading to remote code execution (RCE) on PHP 7.x systems. On PHP 8.x, while the immediate RCE is mitigated, the potential for exploitation remains if downstream consumers invoke certain methods.

How To Fix

Minimum fixed version

1.30.5

This is the first release that contains the fix.

composer require phpoffice/phpspreadsheet:1.30.5

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can modify the prohibitWrappers function to check for stream wrappers without relying on parse_url. Here is an example of how to implement this:

public static function prohibitWrappers(string $filename): void {
    if (str_contains($filename, ':\/\/')) {
        throw new Exception("Stream wrappers are not permitted as file paths: {$filename}");
    }
}

Conclusion

In summary, CVE-2026-45034 is a critical vulnerability in PHPSpreadsheet that can lead to remote code execution if not addressed. Users are strongly advised to update to the latest version or implement the provided workaround to mitigate the risk.

See every vulnerability recorded for phpoffice/phpspreadsheet →

Share this vulnerability

FAQ

CVE-2026-45034 is a vulnerability in PHPSpreadsheet that allows attackers to bypass security measures and potentially execute arbitrary code.

You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to use the Vulert playground without signup.

Versions 1.30.4 and earlier are affected by this vulnerability. The latest patched version is 1.30.5.

If you cannot update immediately, implement the suggested workaround to modify the prohibitWrappers function to prevent the use of stream wrappers.

The CVSS score of this vulnerability is 9.2, indicating a critical level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for phpoffice/phpspreadsheet.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

1.30.5

This is the first release that contains the fix.

composer require phpoffice/phpspreadsheet:1.30.5

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback