CVE-2022-23531: GuardDog vulnerable to arbitrary file write when scanning a specially-crafted PyPI package
(updated )
Running GuardDog against a specially-crafted package can allow an attacker to write an arbitrary file on the machine where GuardDog is executed.
This is 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. See also https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall
References
- github.com/DataDog/guarddog
- github.com/DataDog/guarddog/commit/98af5c8c1e9c15fa888c900252e76116b0ec25d1
- github.com/DataDog/guarddog/pull/89
- github.com/DataDog/guarddog/releases/tag/v0.1.5
- github.com/DataDog/guarddog/security/advisories/GHSA-rp2v-v467-q9vq
- github.com/advisories/GHSA-rp2v-v467-q9vq
- github.com/pypa/advisory-database/tree/main/vulns/guarddog/PYSEC-2022-42994.yaml
- nvd.nist.gov/vuln/detail/CVE-2022-23531
Code Behaviors & Features
Detect and mitigate CVE-2022-23531 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →