Skip to content

Unsafe Deserialization in phpoffice/phpspreadsheet

CVE-2026-34084 First seen on SecPulse

Summary

vulnerability in phpoffice/phpspreadsheet (CVE-2026-34084). Successful exploitation can lead to full system takeover. Exploitable via is_file. Mitigation: upgrade to 1.30.3 or later.

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

A significant bug has been found in PhpSpreadsheet that could allow attackers to execute code remotely by exploiting specially crafted file paths. This vulnerability can seriously compromise your system. Updating to the patched version promptly is critical to avoid potential damage.

The vulnerability in PhpSpreadsheet's IOFactory::load method allows an attacker to misuse the user-controlled $filename parameter, primarily due to improper use of the is_file function. Versions affected are up to 1.30.2, with the patch released in 1.30.3. Attacks can use PHP wrappers like phar:// to execute RCE or SSRF. To mitigate, it is recommended to run 'composer require phpoffice/phpspreadsheet:^1.30.3'.

What is the problem

Improper handling of user-controlled file paths in PhpSpreadsheet's IOFactory::load leads to SSRF/RCE.

Affected scope

PhpSpreadsheet's IOFactory::load function uses vulnerable handling of $filename, affected up to version 1.30.2.

Severity

Critical severity, allows remote code execution and server-side request forgery.

How to fix

Upgrade to PhpSpreadsheet 1.30.3 or later using 'composer require phpoffice/phpspreadsheet:^1.30.3'.

Workaround

No workaround available other than updating to the patched version.

Detection

Look for unauthorized file access patterns in logs, specifically with FTP, Phar, and SSH2.SFTP protocols.

Related past incidentsSimilar incidents extracted from past CVEs

PhpSpreadsheet prior 1.28.1 also had an SSRF vulnerability due to unsafe input handling in file paths.

PHP-FPM in PHP 7.3 had an RCE vulnerability similar in impact, exploiting incorrect path validation.

Unrelated software exploited PHP path misconfigurations, highlighting similar impact patterns.

If this happens at your companyExpected impact per business scenario

ECサイトの場

攻撃者が商品情報を外部のFTPサーバに流出させる原因になり、信頼失墜を招くリスク。

業務SaaSの場

内部情報が漏洩し、機密性のあるデータが攻撃者により悪用される可能性。

社内システムの場

攻撃者が管理者権限を乗っ取り、システム全体を不正操作される恐れ。

Recommended action

全サーバーに対して早急に最新の修正版にアップデートし、不正アクセスの監査を実施すること。

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposureidentify
    grep -r 'phpoffice/phpspreadsheet' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で phpoffice/phpspreadsheet を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Match against affected rangeverify
    Confirm if version satisfies `>= 4.0.0, <= 5.5.0`

    Step 1 で見つかったバージョンが影響範囲 >= 4.0.0, <= 5.5.0 に該当するか照合。本番で稼働中ならインシデント扱い。

  3. 6
    Apply patchpatch
    Upgrade phpoffice/phpspreadsheet to 1.30.3

    ステージング環境で 1.30.3 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 3 で見つけた異常検知の続報チェックを含めること。

  4. 7
    Post-deployment verificationverify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 3 と同じログクエリでアラート再発が無いか継続監視。

Affected packages

PackageAffected → Fixed
composerphpoffice/phpspreadsheet
< 1.30.3→ 1.30.3
Packagistphpoffice/phpspreadsheet
< 1.30.3→ 1.30.3
Original description The description as published by the source.

PhpSpreadsheet is a library for reading and writing spreadsheet files. In 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, when the filename argument to IOFactory::load() is user-controlled, an attacker can supply a PHP stream wrapper path (such as phar://, ftp://, or ssh2.sftp://) that passes the is_file() check in File::assertFile(). The phar:// wrapper triggers deserialization of the PHAR metadata, which can lead to remote code execution if a suitable gadget chain is available in the application. The ftp:// and ssh2.sftp:// wrappers can be used for server-side request forgery. This issue has been fixed in versions 1.30.3, 2.1.15, 2.4.4, 3.10.4, and 5.6.0.

Source: NIST National Vulnerability Database NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details