Vulnerability · Published Dec 16, 2022 · Assigned by GitHub_M
CVE-2022-23531Arbitrary file write when scanning a specially-crafted local PyPI package
Medium 5.8
In plain English
A medium-severity security flaw in guarddog from DataDog. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 55% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
GuardDog is a CLI tool to identify malicious PyPI packages. Versions prior to 0.1.5 are vulnerable to Relative Path Traversal when scanning a specially-crafted local PyPI package. Running GuardDog against a specially-crafted package can allow an attacker to write an arbitrary file on the machine where GuardDog is executed due to a path traversal vulnerability when extracting the .tar.gz file of the package being scanned, which exists by design in the tarfile.TarFile.extractall function. This issue is patched in version 0.1.5.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | guarddog | 0.1.5 | GHSA-rp2v-v467-q9vq |
| PyPI | guarddog | 0.1.5 | PYSEC-2022-42994 |
Affected products (as reported)
Weakness: CWE-23 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L