Path Traversal in gramps-webapi
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.
Path traversal (CWE-22) exists in gramps-webapi. Attackers reach the vulnerable code path via zipfile.
Check the vendor advisory for the affected versions of gramps-webapi. Attack surface: zipfile.
Severity: ?. Successful exploitation can lead to full system takeover.
Update to 3.11.1.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
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
Identify exposureidentify
grep -r 'gramps-webapi' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
gramps-webapiを grep し、稼働しているサービス・バージョンを把握する。 -
2
Apply patchpatch
Upgrade gramps-webapi to 3.11.1ステージング環境で 3.11.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3
Post-deployment verificationverify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| PyPIgramps-webapi |
≥ 1.6.0, < 3.11.1→ 3.11.1 |
3.11.1 |
| pipgramps-webapi |
< 3.11.1→ 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
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web pypi.org
- web github.com