CVE-2026-40258 Gramps Web API has Zip Slip Path Traversal in Media Archive Import

Critical 9.1 Published Updated

Authenticated owners can exploit Zip Slip in media import to write arbitrary files outside the intended directory, requiring an upgrade to fix.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-40258?

CVE-2026-40258 is a critical path traversal vulnerability in gramps-project gramps-web-api, published on 17 Apr 2026. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

The Gramps Web API is a Python REST API for the genealogical research software Gramps. Versions 1.6.0 through 3.11.0 have a path traversal vulnerability (Zip Slip) 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. Startig in version 3.11.1, 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.

Weakness: CWE-22

Which versions are affected by CVE-2026-40258?

3 open source packages ship an affected version, including gramps-webapi.

PackageAffectedFixed in
gramps-webapi PyPIFrom 1.6.03.11.1
gramps-webapi PyPIFrom 1.6.03.11.1
gramps-webapi PyPIFrom 1.6.03.11.1

How do I fix CVE-2026-40258?

Upgrade gramps-webapi to 3.11.1 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-40258 being exploited?

There is no known exploitation of CVE-2026-40258 in the wild and no public exploit code.

Sources

Also known as GHSA-m5gr-86j6-99jp, PYSEC-2026-346.

Is CVE-2026-40258 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free