CVE-2026-45034: CWE-502: Deserialization of Untrusted Data in PHPOffice PhpSpreadsheet
PhpSpreadsheet before version 1.30.5 contains a deserialization vulnerability related to improper handling of phar stream wrappers. The vulnerability allows an attacker to bypass a patch intended to block dangerous stream wrappers due to a parsing flaw with URLs containing three or more slashes after the scheme. On PHP 7.x, this can lead to remote code execution (RCE) via automatic deserialization of phar metadata. On PHP 8.x, RCE requires additional conditions involving Phar::getMetadata. The issue is fixed in version 1.30.5.
AI Analysis
Technical Summary
PhpSpreadsheet prior to 1.30.5 attempted to mitigate a deserialization vulnerability (CVE-2026-34084) by checking stream wrappers using parse_url and rejecting schemes with length greater than one. However, when the input path uses a phar wrapper with three or more slashes (e.g., phar:///path/file.phar/inner), parse_url returns false for the scheme, causing the check to be bypassed. PHP's stream layer still processes the phar wrapper, leading to automatic deserialization of phar metadata on PHP 7.x, invoking magic methods (__wakeup and __destruct) of attacker-controlled objects and enabling full remote code execution. On PHP 8.x, automatic metadata deserialization on file operations was removed, so RCE only occurs if Phar::getMetadata is called downstream. This vulnerability is addressed in PhpSpreadsheet version 1.30.5.
Potential Impact
Successful exploitation on PHP 7.x environments can lead to full remote code execution without authentication due to automatic deserialization of attacker-controlled phar metadata. On PHP 8.x, the risk is reduced but still present if the application calls Phar::getMetadata on attacker-controlled files. This vulnerability allows an unauthenticated attacker to execute arbitrary code on the server running vulnerable PhpSpreadsheet versions prior to 1.30.5.
Mitigation Recommendations
Upgrade PhpSpreadsheet to version 1.30.5 or later, where this vulnerability is fixed. No other official remediation or temporary fix is documented. If upgrading is not immediately possible, avoid loading untrusted files with IOFactory::load and do not allow attacker-controlled input to specify file paths that could include phar wrappers. Patch status is not explicitly confirmed beyond the fixed version; check vendor advisories for updates.
CVE-2026-45034: CWE-502: Deserialization of Untrusted Data in PHPOffice PhpSpreadsheet
Description
PhpSpreadsheet before version 1.30.5 contains a deserialization vulnerability related to improper handling of phar stream wrappers. The vulnerability allows an attacker to bypass a patch intended to block dangerous stream wrappers due to a parsing flaw with URLs containing three or more slashes after the scheme. On PHP 7.x, this can lead to remote code execution (RCE) via automatic deserialization of phar metadata. On PHP 8.x, RCE requires additional conditions involving Phar::getMetadata. The issue is fixed in version 1.30.5.
CVSS v4.0
Score 9.2critical
Affected software
pkg:composer/phpoffice/phpspreadsheetRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
PhpSpreadsheet prior to 1.30.5 attempted to mitigate a deserialization vulnerability (CVE-2026-34084) by checking stream wrappers using parse_url and rejecting schemes with length greater than one. However, when the input path uses a phar wrapper with three or more slashes (e.g., phar:///path/file.phar/inner), parse_url returns false for the scheme, causing the check to be bypassed. PHP's stream layer still processes the phar wrapper, leading to automatic deserialization of phar metadata on PHP 7.x, invoking magic methods (__wakeup and __destruct) of attacker-controlled objects and enabling full remote code execution. On PHP 8.x, automatic metadata deserialization on file operations was removed, so RCE only occurs if Phar::getMetadata is called downstream. This vulnerability is addressed in PhpSpreadsheet version 1.30.5.
Potential Impact
Successful exploitation on PHP 7.x environments can lead to full remote code execution without authentication due to automatic deserialization of attacker-controlled phar metadata. On PHP 8.x, the risk is reduced but still present if the application calls Phar::getMetadata on attacker-controlled files. This vulnerability allows an unauthenticated attacker to execute arbitrary code on the server running vulnerable PhpSpreadsheet versions prior to 1.30.5.
Mitigation Recommendations
Upgrade PhpSpreadsheet to version 1.30.5 or later, where this vulnerability is fixed. No other official remediation or temporary fix is documented. If upgrading is not immediately possible, avoid loading untrusted files with IOFactory::load and do not allow attacker-controlled input to specify file paths that could include phar wrappers. Patch status is not explicitly confirmed beyond the fixed version; check vendor advisories for updates.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-08T16:58:28.897Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a39a0f5eed863c81e6b01db
Added to database: 06/22/2026, 20:54:13 UTC
Last enriched: 06/22/2026, 21:09:12 UTC
Last updated: 06/22/2026, 22:16:02 UTC
Views: 10
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.