Skip to content
Critical 9.1

Path Traversal in gramps-webapi

CVE-2026-40258 First seen on SecPulse

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 vulnerability tracked as CVE-2026-40258 has been found in gramps-webapi.
Attackers can target a specific entry point like zipfile over the network to misuse the product.
Successful exploitation can lead to full system takeover.
What to do: upgrade gramps-webapi to 3.11.1 or later.
If unsure, ask your IT team or search "gramps-webapi CVE-2026-40258" on the vendor's site.

CVE-2026-40258 (gramps-webapi) — CWE-22
Attack vector: remote (network-reachable) / no user interaction
Attack surface: zipfile
Patched: 3.11.1 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

What is the problem

Path traversal (CWE-22) exists in gramps-webapi. Attackers reach the vulnerable code path via zipfile.

Affected scope

Check the vendor advisory for the affected versions of gramps-webapi. Attack surface: zipfile.

Severity

Severity: ?. Successful exploitation can lead to full system takeover.

How to fix

Update to 3.11.1.

Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'gramps-webapi' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

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

  1. 1
    Identify exposureidentify
    grep -r 'gramps-webapi' . | grep -v node_modules

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

  2. 2
    Apply patchpatch
    Upgrade gramps-webapi to 3.11.1

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

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

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

Affected packages

PackageAffected → Fixed
PyPIgramps-webapi
≥ 1.6.0, < 3.11.1→ 3.11.1
pipgramps-webapi
< 3.11.1→ 3.11.1
Original description The description as published by the source.

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…

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

References

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