Impact
PhpSpreadsheet is a library for handling spreadsheet files. In the affected versions, if the filename parameter passed to IOFactory::load() is user‑controlled, an attacker can supply a PHP stream wrapper such as phar://, ftp://, or ssh2.sftp://. The phar:// wrapper bypasses the is_file() check and triggers deserialization of PHAR metadata, which can lead to remote code execution when a suitable gadget chain is present. The ftp:// and ssh2.sftp:// wrappers enable the application to perform outbound requests, creating a server‑side request forgery vector.
Affected Systems
The issue resides in PHPOffice PhpSpreadsheet versions 1.30.2 and earlier, 2.0.0 through 2.1.14, 2.2.0 through 2.4.3, 3.3.0 through 3.10.3, and 4.0.0 through 5.5.0. The vulnerability was remediated in 1.30.3, 2.1.15, 2.4.4, 3.10.4, and 5.6.0.
Risk and Exploitability
The flaw carries a CVSS score of 9.2, denoting high severity. EPSS data is unavailable, and the vulnerability is not included in the CISA KEV catalog. The likely attack path requires an attacker to supply a crafted file path or URL to the IOFactory::load call. When a phar:// URI containing malicious PHAR metadata is used, deserialization may execute arbitrary code. Alternatively, ftp:// or ssh2.sftp:// wrappers can cause the server to contact internal targets, allowing exploitation of internal services or data.
OpenCVE Enrichment
Github GHSA