# CVE-2026-45034: PhpSpreadsheet: File::prohibitWrappers bypass

- Severity: Critical 9.2 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.35%, higher than 30% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-08T23:00:14.000Z
- Modified: 2026-10-25T23:10:00.167Z
- Also known as: GHSA-87m4-826x-3crx
- Weaknesses: CWE-502
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- PHPOffice PhpSpreadsheet: < 1.30.5
- phpoffice/phpspreadsheet (Packagist): before 1.30.5

## Every score

- GitHub_M: CVSS:4.0 9.2 Critical `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 Critical `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-87m4-826x-3crx> (exploit, web)
- <https://github.com/PHPOffice/PhpSpreadsheet> (package)
- <https://github.com/advisories/GHSA-q4q6-r8wh-5cgh> (advisory)

## Sources

- CVE List: [CVE-2026-45034](https://www.cve.org/CVERecord?id=CVE-2026-45034), CVE Terms of Use, modified 2026-06-23
- GitHub Advisory Database: [GHSA-87m4-826x-3crx](https://github.com/advisories/GHSA-87m4-826x-3crx), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-45034](https://nvd.nist.gov/vuln/detail/CVE-2026-45034), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-45034 · Whole record: https://cve.day/CVE-2026-45034.json · Rebuilt by cve.day 2026-11-25T22:59:25.411Z
