
PoC exploit for PHPSpreadsheet's phar:// deserialization vulnerability, bypassing prohibitWrappers to achieve remote code execution on vulnerable PHP applications.
Bypass
prohibitWrappers+ Remote Code Execution (RCE) onphpoffice/phpspreadsheet
This repository provides a proof-of-concept (PoC) exploit for a critical vulnerability in the popular PHP library PHPSpreadsheet. The attack abuses the phar:// wrapper to trigger object deserialization, leading to bypass of security protections and even full remote code execution on vulnerable versions.
| Version | Status | Description |
|---|
| 5.7.0 (latest 5.x) | ✅ Bypass | prohibitWrappers protection can be bypassed, but RCE gadget chain may be missing. |
| 1.30.4 (latest 1.x) | 🔥 RCE | Full gadget chain exists (PHP 7.4) – arbitrary code execution possible. |
The vulnerability occurs when user-controlled input is passed to functions that accept a phar:// stream wrapper. By crafting a malicious PHAR archive containing a serialized gadget, an attacker can trigger __wakeup() and __destruct() calls, leading to file write or command execution.
git clone https://github.com/Cyber-DarkNay/CVE-2026-45034.git
cd CVE-2026-45034