GIVE YOUR AGENT THE EVIDENCE

Set up in your agent.

One prompt to get started. Paste it into your coding agent to connect cve.new through MCP and bring vulnerability context into your workflow.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GIVE YOUR AGENT THE EVIDENCE

Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GHSA-m5gr-86j6-99jpcritical9.1

gramps-webapi: Zip Slip Path Traversal in Media Archive Import

Check your stack

The advisory, in context

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.

Affected packages

Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.

Ecosystem versions

From 1.6.0 before 3.11.1

Fixed in 3.11.1

40 explicitly affected versions

1.6.0, 2.0.0, 2.1.0, 2.2.0, 2.2.1, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0, 2.7.0, 2.8.0, 2.8.1, 2.8.2, 2.9.0, 2.9.1, 2.9.2, 3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.10.0, 3.11.0, 3.2.0, 3.3.0, 3.4.0, 3.4.1, 3.5.0, 3.6.0, 3.7.0, 3.7.1, 3.8.0, 3.9.0, 3.9.1

View affected-version evidence
{
  "ranges": [
    {
      "events": [
        {
          "introduced": "1.6.0"
        },
        {
          "fixed": "3.11.1"
        }
      ],
      "type": "ECOSYSTEM"
    }
  ],
  "versions": [
    "1.6.0",
    "2.0.0",
    "2.1.0",
    "2.2.0",
    "2.2.1",
    "2.3.0",
    "2.3.1",
    "2.4.0",
    "2.4.1",
    "2.4.2",
    "2.4.3",
    "2.5.0",
    "2.5.1",
    "2.5.2",
    "2.5.3",
    "2.6.0",
    "2.7.0",
    "2.8.0",
    "2.8.1",
    "2.8.2",
    "2.9.0",
    "2.9.1",
    "2.9.2",
    "3.0.0",
    "3.0.1",
    "3.0.2",
    "3.1.0",
    "3.10.0",
    "3.11.0",
    "3.2.0",
    "3.3.0",
    "3.4.0",
    "3.4.1",
    "3.5.0",
    "3.6.0",
    "3.7.0",
    "3.7.1",
    "3.8.0",
    "3.9.0",
    "3.9.1"
  ]
}

References