{"id":"GHSA-rp2v-v467-q9vq","summary":"GuardDog vulnerable to arbitrary file write when scanning a specially-crafted PyPI package","details":"### Impact\n\nRunning GuardDog against a specially-crafted package can allow an attacker to write an arbitrary file on the machine where GuardDog is executed.\n\nThis 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\n\n### Remediation\n\nUpgrade to GuardDog v0.1.5 or more recent.\n\n### References\n\n* https://semgrep.dev/r?q=trailofbits.python.tarfile-extractall-traversal.tarfile-extractall-traversal\n* https://www.trellix.com/en-us/about/newsroom/stories/research/tarfile-exploiting-the-world.html\n* https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall\n","aliases":["CVE-2022-23531","PYSEC-2022-42994"],"modified":"2026-02-22T22:55:57.366884Z","published":"2022-12-02T22:25:25Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2022-12-02T22:25:25Z","nvd_published_at":"2022-12-17T00:15:00Z","cwe_ids":["CWE-22","CWE-23"],"severity":"LOW"},"references":[{"type":"WEB","url":"https://github.com/DataDog/guarddog/security/advisories/GHSA-rp2v-v467-q9vq"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23531"},{"type":"WEB","url":"https://github.com/DataDog/guarddog/pull/89"},{"type":"WEB","url":"https://github.com/DataDog/guarddog/commit/98af5c8c1e9c15fa888c900252e76116b0ec25d1"},{"type":"PACKAGE","url":"https://github.com/DataDog/guarddog"},{"type":"WEB","url":"https://github.com/DataDog/guarddog/releases/tag/v0.1.5"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/guarddog/PYSEC-2022-42994.yaml"}],"affected":[{"package":{"name":"guarddog","ecosystem":"PyPI","purl":"pkg:pypi/guarddog"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.5"}]}],"versions":["0.1.1","0.1.3","0.1.4"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/12/GHSA-rp2v-v467-q9vq/GHSA-rp2v-v467-q9vq.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L"},{"type":"CVSS_V4","score":"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"}]}