CVE-2026-22871 GuardDog Path Traversal Vulnerability Leads to Arbitrary File Overwrite and RCE

High 8.7 Published Updated

Attackers can exploit path traversal in GuardDog to overwrite arbitrary files and execute remote code via malicious PyPI packages.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-22871?

CVE-2026-22871 is a high-severity path traversal vulnerability in DataDog guarddog, published on 13 Jan 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-22

Which versions are affected by CVE-2026-22871?

3 open source packages ship an affected version, including guarddog. It affects 1 product.

PackageAffectedFixed in
guarddog PyPIAll versions2.7.1
guarddog PyPIAll versions2.7.1
guarddog PyPIAll versions2.7.1

Products include Datadoghq Guarddog.

How do I fix CVE-2026-22871?

Upgrade guarddog to 2.7.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-22871 being exploited?

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

Sources

Also known as GHSA-xg9w-vg3g-6m68, PYSEC-2026-1430.

Is CVE-2026-22871 in your software?

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

Check your SBOMs for free