Skip to main content

Python CVE-2026-40258

CRITICAL
Path Traversal (CWE-22)
2026-04-10 https://github.com/gramps-project/gramps-web-api GHSA-m5gr-86j6-99jp
9.1
CVSS 3.1 · Vendor: https://github.com/gramps-project/gramps-web-api
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as owner-level user
  2. Delivery
    Craft malicious ZIP with directory-traversal filenames
  3. Exploit
    Upload via media archive import
  4. Execution
    Trigger extractall without validation
  5. Impact
    Write arbitrary files to filesystem

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Authenticated user with owner-level privileges in Gramps Web API must upload a crafted ZIP file through the media archive import feature. The vulnerability exists in MediaImporter._check_disk_space_and_extract() which lacks ZIP entry name validation, allowing path traversal via directory-traversal filenames.

Impact

CVSS 9.1 reflects high severity due to network accessibility and scope change enabling cross-tree data corruption in SQLite deployments. However, real-world impact is deployment-dependent: Postgres+S3 eliminates persistent data risk; Postgres+S3+environment-only config limits exposure to ephemeral storage. Requires authenticated owner-level privileges, substantially reducing blast radius in multi-tenant environments.

Exploit ScenarioDerived

Authenticated owner creates malicious ZIP with ../../../ traversal sequences targeting sibling tree's SQLite database or config files, uploads via media import feature. extractall() extracts payloads outside intended directory, overwriting target files without validation.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 10, 2026

Path traversal (Zip Slip) in gramps-web-api media archive import allows authenticated owner-privileged users to write arbitrary files outside intended directories via malicious ZIP archives. Exploitation requires owner-level access and enables cross-tree data corruption in multi-tree SQLite deployments or config file overwrite in volume-mounted configurations. Postgres+S3 deployments limit impact to ephemeral container storage. No public exploit identified at time of analysis.

RemediationAI

Vendor-released patch: upgrade to gramps-webapi version 3.11.1 or later, which implements path validation preventing directory traversal during ZIP extraction. Install via pip: pip install --upgrade gramps-webapi>=3.11.1. For environments unable to upgrade immediately, restrict owner-level permissions to trusted administrators only and audit existing media archive imports for unexpected filesystem modifications. Multi-tree deployments should migrate to Postgres+S3 storage backends to eliminate persistent local filesystem attack surface. Consult vendor advisory at https://github.com/gramps-project/gramps-web-api/security/advisories/GHSA-m5gr-86j6-99jp and review patch implementation at https://github.com/gramps-project/gramps-web-api/commit/3ed4342711e3ec849552df09b1fe2fbf2ca5c29a for technical details.

Affected Packages

pypi gramps-webapi fix: 3.11.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Unsafe use of Python zipfile.extractall() in MediaImporter._check_disk_space_and_extract() function fails to sanitize ZIP entry names containing ../ directory traversal sequences. CWE-22 path traversal permits extraction to arbitrary filesystem locations resolved relative to extraction directory. Fix validates ZIP entry resolved real paths against temporary directory boundaries before extraction.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/gramps-project/gramps-web-api) PRIMARY 9.1 CRITICAL
AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

Primary rating from Vendor (https://github.com/gramps-project/gramps-web-api) · only source for this CVE.

CVSS VectorVendor: https://github.com/gramps-project/gramps-web-api

Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch released
Apr 10, 2026 - 21:45 nvd
Patch available
CVE Published
Apr 10, 2026 - 21:00 nvd
CRITICAL 9.1

DescriptionCVE.org

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 on the local filesystem. Impact is limited to writes to ephemeral container storage, which are lost on woker restart.

Fix

ZIP entry names are now validated against the resolved real path of the temporary directory before extraction. Any entry whose resolved path falls outside the temporary directory raises an error and aborts the import.

Executive ViewAI

Why It Matters

CVE-2026-40258 is a critical path traversal vulnerability in gramps-web-api that allows authenticated owner-level users to write arbitrary files outside intended directories during media archive imports, potentially corrupting genealogical data across multiple family trees or overwriting system configuration files. Organizations using gramps-web-api with SQLite-backed multi-tree deployments or volume-mounted configurations face immediate risk of data corruption and service compromise, while those on Postgres+S3 architectures have reduced exposure limited to ephemeral storage.

Business Impact: Severe
Compensating Controls

Apply vendor patch. If patching cannot be completed immediately: disable media archive import functionality until patch deployed; restrict owner-level account access to essential personnel only; implement file-level access controls and integrity monitoring on configuration and data directories; for SQLite deployments, enforce single-tree-per-instance architecture as temporary mitigation.

Threat Intelligence Overview

EPSS Score
0.1%
Top 84% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Affected Products (CPE)CVE.org

pkg:pip/gramps-webapi

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy