CVE DatabaseCVE-2026-22871
한국어 권고문 →
CVE-2026-228719.8/CRITICALCWE-22

GuardDog CLI Path Traversal Vulnerability Leading to Arbitrary File Overwrite and Remote Code Execution (CVE-2026-22871)

⚡ Jump to Patch
Affected Vendors
datadog
Affected Components
guarddog
Published Date
2026-01-13
CVSS v3.1
9.8
CRITICAL
EPSS (30d)
1.1%
FIRST.org
CISA KEV
Not Listed

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

All systems and CI/CD pipelines running GuardDog versions prior to 2.7.1

Impact

Malicious PyPI packages can exploit path traversal to write arbitrary files outside the extraction directory, leading to Arbitrary File Overwrite and Remote Code Execution (RCE)

Mitigation

Immediately upgrade GuardDog to version 2.7.1 or higher

Affected Products & Version Scope

All versions of GuardDog prior to 2.7.1 (Fixed in 2.7.1)

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

GuardDog has released version 2.7.1 to address this vulnerability. Upgrade your installation immediately using your package manager.

bash
# Upgrade GuardDog using pip
pip install --upgrade guarddog

# Or enforce the minimum secure version\pip install 'guarddog>=2.7.1'

# Upgrade using Poetry
poetry add guarddog@latest

2. Temporary Workaround & Hardening Configuration

If an immediate upgrade is not feasible, mitigate the risk by running GuardDog within a highly restricted, non-root container environment to limit the impact of arbitrary file writes.

bash
# Example of running GuardDog as a non-root user in Docker
FROM python:3.10-slim
RUN useradd -m guarddog_user
USER guarddog_user
WORKDIR /home/guarddog_user
RUN pip install --user guarddog==2.7.0
# Ensure the container has no write access to critical host directories

3. Log Audit & IoC Verification Commands

Use the following script to check the installed GuardDog version and verify if your environment is running a vulnerable version.

bash
# Check the installed version of GuardDog
installed_version=$(pip show guarddog | grep Version | awk '{print $2}')
echo 'Current GuardDog Version:' $installed_version

# Verify if the version is below 2.7.1
if [ '$(printf '%s\
' '2.7.1' '$installed_version' | sort -V | head -n1)' != '2.7.1' ]; then
  echo '[WARNING] Vulnerable GuardDog version detected! Please upgrade immediately.'
else
  echo '[INFO] GuardDog is running a secure version.'
fi
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
Snyk Open Source & Container Security
To secure your DevSecOps pipeline against supply chain compromises, immediately upgrade GuardDog to version 2.7.1 or later.

Scan Your Repositories for Transitive Vulnerable Dependencies in 30 Seconds

Automatically detect vulnerable packages across npm, PyPI, Maven, and Go, and open automated fix Pull Requests without breaking your build.

Free Forever Tier · 1-Click GitHub/GitLab Auto-PR
Master DevSecOps: Automated SAST/SCA in GitHub Actions & Kubernetes
View Course Curriculum

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2026-22871) is a Path Traversal (CWE-22) vulnerability existing in the safe_extract() function of GuardDog, a CLI tool designed to identify malicious PyPI packages. The root cause lies in the insufficient validation of relative file paths within PyPI package archives during the extraction and analysis process. When GuardDog processes a crafted archive containing directory traversal sequences (e.g., ../), it fails to restrict the extraction path to the intended target directory.

2. Exploitation Mechanics & Attack Scenario

An attacker can craft a malicious PyPI package containing files with path traversal sequences in their names (e.g., ../../../../etc/cron.d/malicious_job or ../../../../home/user/.bashrc). When GuardDog is executed to scan this package, the safe_extract() function extracts these files directly into arbitrary locations on the host filesystem, bypassing directory boundaries. This allows the attacker to overwrite critical system files or inject malicious scripts, resulting in privilege escalation and arbitrary code execution.

3. Infrastructure & Business Impact

Since GuardDog is commonly integrated into developer workstations and DevSecOps CI/CD pipelines to scan third-party dependencies, successful exploitation can compromise the entire build infrastructure. This could lead to source code exfiltration, supply chain contamination, and unauthorized access to production environments, posing severe business and operational risks.

Official Vendor Advisories & References

NVD Original English Description

GuardDog is a CLI tool to identify malicious PyPI packages. Prior to 2.7.1, there is a path traversal vulnerability exists in GuardDog's safe_extract() function that allows malicious PyPI packages to write arbitrary files outside the intended extraction directory, leading to Arbitrary File Overwrite and Remote Code Execution on systems running GuardDog. This vulnerability is fixed in 2.7.1.

Frequently Asked SecOps Questions (CVE-2026-22871)

FAQ

Q1. How critical is CVE-2026-22871 and is it actively exploited in the wild?

CVE-2026-22871 is rated CVSS 9.8 (CRITICAL) with a 30-day EPSS exploitation probability of 1.1%. Organizations running affected versions should prioritize patching based on network exposure.

Q2. Which vendors and products are affected by CVE-2026-22871?

Primary impacted vendors include datadog across guarddog. Scope summary: All versions of GuardDog prior to 2.7.1 (Fixed in 2.7.1)

Q3. What temporary mitigations or workarounds exist for CVE-2026-22871 before patching?

[Mitigation] Immediately upgrade GuardDog to version 2.7.1 or higher Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2026-22871

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (datadog)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2026-22871 GuardDog CLI Path Traversal Vulnerability Leading to Arbitrary File Overwrite and Remote Code Execution (CVE-2026-22871) (CVSS 9.8) - Patch & Workaround | CVE Pulse