The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-40258

CVE-2026-40258: Gramps Web API Path Traversal Flaw

CVE-2026-40258 is a path traversal (Zip Slip) vulnerability in Gramps Web API that lets authenticated owners write arbitrary files outside intended directories. This article covers technical details, affected versions, and mitigation.

Published: April 23, 2026

CVE-2026-40258 Overview

CVE-2026-40258 is a critical path traversal vulnerability, commonly known as "Zip Slip," affecting the Gramps Web API, a Python REST API for the genealogical research software Gramps. The vulnerability exists in the media archive import feature and allows authenticated users with owner-level privileges to craft malicious ZIP files containing directory-traversal filenames. This enables arbitrary file writes outside the intended temporary extraction directory on the server's local filesystem, potentially leading to remote code execution or complete system compromise.

Critical Impact

Authenticated attackers with owner privileges can achieve arbitrary file write on the server filesystem, potentially enabling remote code execution, configuration tampering, or deployment of web shells.

Affected Products

  • Gramps Web API versions 1.6.0 through 3.11.0

Discovery Timeline

  • 2026-04-17 - CVE-2026-40258 published to NVD
  • 2026-04-20 - Last updated in NVD database

Technical Details for CVE-2026-40258

Vulnerability Analysis

This vulnerability is classified as CWE-22 (Path Traversal) and manifests in the media archive import functionality of the Gramps Web API. The flaw occurs because the application extracts ZIP file contents without validating that the resolved paths of archive entries remain within the intended temporary directory boundary. An attacker can exploit this by including specially crafted filenames in a ZIP archive that contain directory traversal sequences (e.g., ../../../etc/cron.d/malicious).

When the malicious ZIP is processed by the media import feature, files are written to arbitrary locations on the server filesystem based on the attacker-controlled paths embedded in the archive. While exploitation requires owner-level authentication, this still presents a significant risk in multi-tenant environments or scenarios where owner accounts may be compromised.

Root Cause

The root cause of CVE-2026-40258 lies in the media_importer.py module's handling of ZIP file extraction. Prior to version 3.11.1, the code called zip_file.extractall(temp_dir) without first validating that each archive member's resolved path remained within the temporary directory boundary. This allowed malicious archive entries with traversal sequences to escape the intended extraction directory.

Attack Vector

The attack vector is network-based and requires authentication with owner-level privileges. An attacker must:

  1. Obtain owner-level access to the Gramps Web API instance
  2. Craft a malicious ZIP archive containing filenames with path traversal sequences (e.g., ../../var/www/html/shell.php)
  3. Upload the malicious archive through the media import feature
  4. Upon extraction, files are written to arbitrary locations outside the temporary directory

The following patch demonstrates how version 3.11.1 addresses the vulnerability by validating ZIP entry paths before extraction:

python
                raise ValueError("Not enough free space on disk")

            temp_dir = tempfile.mkdtemp()
+            temp_dir_real = os.path.realpath(temp_dir)
+            for member in zip_file.namelist():
+                member_path = os.path.realpath(os.path.join(temp_dir_real, member))
+                if not member_path.startswith(temp_dir_real + os.sep):
+                    raise ValueError(f"Zip Slip path traversal detected: {member}")
            zip_file.extractall(temp_dir)

        return temp_dir

Source: GitHub Commit 3ed4342

Detection Methods for CVE-2026-40258

Indicators of Compromise

  • Unexpected files appearing outside the Gramps Web API temporary directories, particularly in web-accessible or system configuration paths
  • ZIP archive uploads containing entries with ../ sequences or absolute paths in the media import logs
  • New or modified files in critical system directories (e.g., /etc/cron.d/, web root directories, or SSH authorized_keys)
  • Web shell artifacts or unauthorized PHP/Python scripts in application directories

Detection Strategies

  • Monitor file system activity for write operations originating from the Gramps Web API process that target directories outside the expected application paths
  • Implement application-level logging to capture ZIP archive member names during media import operations
  • Deploy file integrity monitoring (FIM) solutions to detect unauthorized modifications to critical system files and web application directories
  • Review web server access logs for suspicious media import requests followed by access to newly created files

Monitoring Recommendations

  • Configure SIEM alerts for ZIP extraction events combined with file writes to sensitive directories
  • Enable enhanced audit logging for the Gramps Web API application to capture all media import operations and associated file paths
  • Monitor for process execution anomalies that may indicate successful exploitation via web shell deployment
  • Implement network monitoring for command-and-control traffic that may follow successful arbitrary file write attacks

How to Mitigate CVE-2026-40258

Immediate Actions Required

  • Upgrade Gramps Web API to version 3.11.1 or later immediately
  • Audit server filesystem for any unexpected files created outside the application's intended directories
  • Review owner-level account access logs for suspicious media import activity
  • Consider temporarily disabling the media archive import feature until patching is complete

Patch Information

The vulnerability is fully addressed in Gramps Web API version 3.11.1. The fix implements proper path validation by resolving the real path of each ZIP entry and comparing it against the temporary directory boundary before extraction. Any entry whose resolved path falls outside the temporary directory raises an error and aborts the import operation.

For detailed patch information, see:

  • GitHub Security Advisory GHSA-m5gr-86j6-99jp
  • GitHub Release v3.11.1

Workarounds

  • Restrict owner-level account access to only trusted administrators until the patch can be applied
  • Implement web application firewall (WAF) rules to inspect and block ZIP uploads containing path traversal sequences
  • Deploy network segmentation to limit the impact of potential file write exploitation on the server
  • Enable read-only filesystem mounts for critical directories where feasible to prevent malicious file writes
bash
# Configuration example: Restrict file permissions on critical directories
chmod 755 /var/www/html
chown root:root /var/www/html
chmod 700 /etc/cron.d

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechGramps

  • SeverityCRITICAL

  • CVSS Score9.1

  • EPSS Probability0.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-22
  • Technical References
  • GitHub Commit Update

  • GitHub Release v3.11.1

  • GitHub Security Advisory GHSA-m5gr-86j6-99jp
  • Latest CVEs
  • CVE-2026-8468: Elixir Plug Library DoS Vulnerability

  • CVE-2026-8295: simdjson Information Disclosure Vulnerability

  • CVE-2025-68421: Comarch ERP Optima Auth Bypass Vulnerability

  • CVE-2025-68420: Comarch ERP Optima Privilege Escalation
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English