Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-22871

CVE-2026-22871: GuardDog Path Traversal Vulnerability

CVE-2026-22871 is a path traversal flaw in GuardDog CLI tool that allows malicious PyPI packages to write arbitrary files and execute remote code. This article covers the technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2026-22871 Overview

CVE-2026-22871 is a path traversal vulnerability in GuardDog, a CLI tool developed by DataDog to identify malicious PyPI packages. Prior to version 2.7.1, the safe_extract() function contains a flaw that allows malicious PyPI packages to write arbitrary files outside the intended extraction directory. This vulnerability enables Arbitrary File Overwrite and Remote Code Execution on systems running GuardDog.

Critical Impact

Attackers can craft malicious PyPI packages that, when scanned by GuardDog, exploit the path traversal vulnerability to overwrite arbitrary files on the host system, potentially achieving remote code execution.

Affected Products

  • GuardDog versions prior to 2.7.1
  • Systems running GuardDog for PyPI package scanning
  • CI/CD pipelines utilizing GuardDog for dependency security checks

Discovery Timeline

  • 2026-01-13 - CVE-2026-22871 published to NVD
  • 2026-01-13 - Last updated in NVD database

Technical Details for CVE-2026-22871

Vulnerability Analysis

This vulnerability is classified as CWE-22 (Path Traversal) and affects the archive extraction functionality within GuardDog. The safe_extract() function in guarddog/utils/archives.py improperly handled file paths during ZIP archive extraction. When processing ZIP files, the function concatenated the target directory with the file path from within the archive, creating a nested path structure that could be manipulated by an attacker.

The flaw specifically occurred in how the zip.extract() method was called. By including path traversal sequences (such as ../) in filenames within a malicious ZIP archive, an attacker could escape the intended extraction directory and write files to arbitrary locations on the filesystem.

Root Cause

The root cause lies in the improper path construction when extracting files from ZIP archives. The original code passed os.path.join(target_directory, file) as the extraction path, which created a nested directory structure rather than properly constraining extraction to the target directory. This allowed specially crafted filenames containing directory traversal sequences to escape the sandbox.

Attack Vector

An attacker could exploit this vulnerability through the network by hosting a malicious PyPI package containing a specially crafted ZIP archive. When a victim uses GuardDog to scan this package, the tool would extract the malicious archive and inadvertently write files outside the intended directory. This could lead to:

  1. Overwriting critical system files or configuration files
  2. Placing malicious executables in startup directories
  3. Injecting backdoors into existing scripts or applications
  4. Achieving full remote code execution on the victim's system
python
                # Note: zip.extract cleans up any malicious file name
                # such as directory traversal attempts This is not the
                # case of zipfile.extractall
-                zip.extract(file, path=os.path.join(target_directory, file))
+                zip.extract(file, path=target_directory)
    else:
        raise ValueError(f"unsupported archive extension: {source_archive}")

Source: GitHub Commit Update

Detection Methods for CVE-2026-22871

Indicators of Compromise

  • Unexpected file modifications outside of GuardDog's working directories
  • New or modified files in system directories that coincide with GuardDog execution times
  • Suspicious PyPI packages with ZIP archives containing path traversal sequences in filenames
  • Evidence of file overwrites in system startup or configuration directories

Detection Strategies

  • Monitor file system activity during GuardDog execution for writes outside expected directories
  • Implement file integrity monitoring on critical system files and directories
  • Analyze PyPI packages for ZIP entries containing ../ sequences before scanning
  • Review GuardDog logs for extraction activities involving suspicious file paths

Monitoring Recommendations

  • Deploy endpoint detection and response (EDR) solutions to monitor for anomalous file system activity
  • Set up alerts for file modifications in sensitive directories during package scanning operations
  • Implement centralized logging for all GuardDog operations in CI/CD environments
  • Use SentinelOne's behavioral AI to detect unauthorized file writes during package analysis

How to Mitigate CVE-2026-22871

Immediate Actions Required

  • Upgrade GuardDog to version 2.7.1 or later immediately
  • Audit systems that have run vulnerable versions of GuardDog for signs of compromise
  • Review recently scanned PyPI packages for potential malicious content
  • Implement network segmentation to limit the impact of potential compromises in scanning environments

Patch Information

The vulnerability has been fixed in GuardDog version 2.7.1. The fix corrects the path handling in the safe_extract() function by passing only the target_directory to the zip.extract() method, ensuring files are properly extracted within the intended directory without path traversal vulnerabilities. For detailed patch information, refer to the GitHub Security Advisory and the GitHub Commit Update.

Workarounds

  • Run GuardDog in an isolated container or sandbox environment to limit file system access
  • Implement strict file system permissions to prevent writes outside designated directories
  • Use read-only file systems for critical system directories during package scanning operations
  • Pre-validate ZIP archives for path traversal sequences before passing them to GuardDog
bash
# Upgrade GuardDog to patched version
pip install --upgrade guarddog>=2.7.1

# Verify installed version
pip show guarddog | grep Version

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechGuarddog

  • SeverityHIGH

  • CVSS Score8.7

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-22
  • Technical References
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-22870: GuardDog CLI Zip Bomb DoS Vulnerability
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