本文へ移動
English version →
重大 9.1

Gramps Web APIの脆弱性、メディアアーカイブ取り込みで任意のファイルを書き換えられる

CVE-2026-40258 SecPulse初出

概要

Gramps Web APIの1.6.0から3.11.0までに、メディアアーカイブの取り込み機能でパス・トラバーサル(Zip Slip)の脆弱性があります。オーナー権限を持つ認証済みの利用者が細工したZIPファイルを使うと、サーバー上の一時展開先の外側にファイルを書き込まれるおそれがあり、CVSSは9.1です。修正版の3.11.1では、展開前にファイル名を検証して取り込みを中止するようになっているため、3.11.1以降へ更新してください。

AI要約

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

gramps-webapi という製品で、CVE-2026-40258 という番号がついた弱点 (脆弱性) が見つかりました。
悪い人がインターネット越しに zipfile のような特定の入り口を狙うことで、製品の中を不正に操作できてしまいます。
悪用されるとシステム全体を乗っ取られる可能性があります。
対策: gramps-webapi を 3.11.1 以上に更新してください。
心配なら、システム担当者や製品の公式サイトで「gramps-webapi CVE-2026-40258」を検索してください。

CVE-2026-40258 (gramps-webapi) — CWE-22
攻撃ベクター: ネットワーク経由 (リモート攻撃可) / 被害者操作不要
脆弱箇所: zipfile
修正バージョン: 3.11.1 (即時適用推奨)
対応方針: 1) SBOMで影響バージョン横断確認, 2) ステージング検証→本番更新, 3) WAF/プロキシで該当エンドポイントを監視, 4) ログでIOC調査。
参考: 当ページの『参照URL』の GHSA / vendor advisory / patched release を参照。

何が問題か

gramps-webapi に パストラバーサル (CWE-22) があります。攻撃者は zipfile を経由して脆弱な処理に到達できます。

影響範囲

gramps-webapi の影響バージョンはベンダーのアドバイザリで確認してください。攻撃箇所: zipfile。

重要度

重要度: ?。悪用されるとシステム全体を乗っ取られる可能性があります。

修正方法

3.11.1 に更新してください。

暫定回避

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

検知方法

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

対応アクション

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

  1. 1
    影響範囲の特定identify
    grep -r 'gramps-webapi' . | grep -v node_modules

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

  2. 2
    パッチ適用patch
    Upgrade gramps-webapi to 3.11.1

    ステージング環境で 3.11.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

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

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

影響パッケージ

パッケージ影響を受ける版 → 修正版
PyPIgramps-webapi
1.6.0 以上 3.11.1 未満→ 3.11.1
pipgramps-webapi
3.11.1 未満→ 3.11.1
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。

Summary

A path traversal vulnerability (Zip Slip) exists in the media archive import feature. An authenticated user with owner-level privileges can craft a malicious ZIP file with directory-traversal filenames to write arbitrary files outside the intended temporary extraction directory on the server's local filesystem.

Details

When importing media archives as ZIP file, MediaImporter._check_disk_space_and_extract() in gramps_webapi/api/media_importer.py called zipfile.extractall() without validating ZIP entry names. Python's zipfile module does not sanitize entry names containing ../ sequences, allowing extraction to paths outside the target directory.

Only users with owner permission can upload media ZIP archives, so the biggest risk is for multi-tree deployments, where tree owners are distinct from server administrators.

For multi-tree deployments, the impact depends on deployment configuration. Assuming the standard docker-based deployment is used:

  • SQLite family tree + local media: An attacker can overwrite another tree's database file or media files, leading to cross-tree data corruption or replacement.
  • Postgres family tree + S3 media: No persistent tree data is stored on the local filesystem, so cross-tree impact is eliminated. The remaining risk is overwriting volume-mounted files such as the application config file.
  • Postgres family tree + S3 media + environment-variable-only config: No persistent files of value are present o…

出典: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

参照URL

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