CVE-2022-23530
GuardDog vulnerable to arbitrary file write when scanning a specially-crafted remote PyPI package
Description
GuardDog is a CLI tool to identify malicious PyPI packages. Versions prior to v0.1.8 are vulnerable to arbitrary file write when scanning a specially-crafted remote PyPI package. Extracting files using shutil.unpack_archive() from a potentially malicious tarball without validating that the destination file path is within the intended destination directory can cause files outside the destination directory to be overwritten. This issue is patched in version 0.1.8. Potential workarounds include using a safer module, like zipfile, and validating the location of the extracted files and discarding those with malicious paths.
How to fix CVE-2022-23530
To remediate CVE-2022-23530, upgrade the affected package to a fixed version below.
- —upgrade to 0.1.8 or later
- —upgrade to 37c7d0767ba28f4df46117d478f97652594c491c or later
Is CVE-2022-23530 being exploited?
Low — EPSS is 0.8%, meaning exploitation activity has not been observed at scale.
Affected packages (2)
- from 0, < 0.1.8
- from 0, < 37c7d0767ba28f4df46117d478f97652594c491c | from 0, < 0.1.8
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 4.0 | — | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:L/SC:L/SI:L/SA:L |
| osv | CVSS 3.1 | MEDIUM5.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L |