PhpSpreadsheet: File::prohibitWrappers bypass
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-502.
Summary
PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Prior to 1.30.5, CVE-2026-34084 was patched by the helper File::prohibitWrappers. The helper calls parse_url($filename, PHP_URL_SCHEME) and then checks is_string($scheme) && strlen($scheme) > 1 to reject stream wrappers such as phar://, php://, data:// or expect://. The check is not equivalent to "does the path contain a wrapper". When the input has the form phar:///path/file.phar/inner with three or more slashes after the scheme, parse_url returns boolean false instead of returning the scheme string. The is_string($scheme) branch is therefore skipped, the helper returns without throwing, and the caller proceeds. PHP's stream layer, however, still treats phar:///... as a valid phar wrapper and opens the underlying phar file. The result is that IOFactory::load($attackerPath) walks past the patch and still touches the phar wrapper. On PHP 7.x, simply reaching the phar wrapper via is_file is enough for PHP to automatically deserialize the phar metadata, which in turn invokes the magic methods __wakeup and __destruct of an attacker controlled object and gives full RCE. On PHP 8.x, automatic metadata deserialization for plain file ops was removed, so the chain at the PhpSpreadsheet layer reduces to a phar wrapper file read primitive, and RCE only resurfaces if the downstream consumer ever calls Phar::getMetadata. This vulnerability is fixed in 1.30.5.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| PHPOffice | PhpSpreadsheet | before 1.30.5 | 1.30.5 | Patch available | CNA |
| — | phpoffice/phpspreadsheet (Packagist) | before 1.30.5 | 1.30.5 | Patch available | GHSA-87m4-826x-3crx |
- PhpSpreadsheet VendorPHPOffice Affected before 1.30.5 Fixed in 1.30.5 Patch available CNA
- phpoffice/phpspreadsheet (Packagist) Vendor— Affected before 1.30.5 Fixed in 1.30.5 Patch available GHSA-87m4-826x-3crx
Remediation
- Fix · CNA PhpSpreadsheet (PHPOffice) Fixed in 1.30.5
- Fix · GHSA-87m4-826x-3crx phpoffice/phpspreadsheet (Packagist) Fixed in 1.30.5 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-45034
- 2026-10-03 Alias added: GHSA-87m4-826x-3crx
References
More PHPOffice vulnerabilities
- TI-2026-26406 PhpSpreadsheet SSRF and RCE via PHP stream wrappers in IOFactory::load CVSS 4.0CRITICAL 9.2
- TI-2026-79412 PhpSpreadsheet ODS reader exhausts CPU and memory via repeated rows CVSS 4.0HIGH 8.7
- TI-2025-34182 PhpSpreadsheet vulnerable to SSRF when reading and displaying a processed HTML document in the browser CVSS 4.0HIGH 8.7
- TI-2026-78784 Insecure deserialization in PHPOffice PHPPresentation allows code execution CVSS 4.0CRITICAL 9.2
- TI-2024-37339 PhpSpreadsheet vulnerable to unauthorized reflected XSS in Currency.php file CVSS 4.0HIGH 8.3
- TI-2024-37338 PhpSpreadsheet allows unauthorized reflected XSS in `Convert-Online.php` file CVSS 4.0HIGH 8.3
Sources
- CVE-2026-45034 · CVE Program
- CVE-2026-45034 · NVD
- FIRST EPSS
- GHSA-87m4-826x-3crx · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences