{"id":"CVE-2022-23531","aliases":["EUVD-2022-0118","GHSA-rp2v-v467-q9vq","PYSEC-2022-42994"],"status":"published","title":"Arbitrary file write when scanning a specially-crafted local PyPI package","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.","severity":{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00734,"percentile":0.54718,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-22","CWE-23"],"published":"2022-12-02T22:25:25Z","modified":"2026-10-28T02:30:27Z","fixes":[{"ecosystem":"PyPI","package":"guarddog","fixed_in":["0.1.5"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"guarddog","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.5"}]}]},{"source":"osv","ecosystem":"PyPI","package":"guarddog","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.5"}]}],"versions":["0.1.1","0.1.3","0.1.4"]},{"source":"osv","ecosystem":"PyPI","package":"guarddog","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"a56aff58264cb6b7855d71b00dc10c39a5dbd306"}]},{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.5"}]}],"versions":["0.1.1","0.1.3","0.1.4"]}],"products":[{"vendor":"datadog","product":"guarddog"},{"vendor":"datadoghq","product":"guarddog"}],"references":[{"url":"https://github.com/DataDog/guarddog/security/advisories/GHSA-rp2v-v467-q9vq","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/DataDog/guarddog/pull/89/commits/a56aff58264cb6b7855d71b00dc10c39a5dbd306","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","web","fix"]},{"url":"https://github.com/DataDog/guarddog/releases/tag/v0.1.5","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23531","tags":["advisory"]},{"url":"https://github.com/DataDog/guarddog/pull/89","tags":["web"]},{"url":"https://github.com/DataDog/guarddog/commit/98af5c8c1e9c15fa888c900252e76116b0ec25d1","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/guarddog/PYSEC-2022-42994.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-rp2v-v467-q9vq"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/23xxx/CVE-2022-23531.json","tags":["advisory"]},{"url":"https://github.com/DataDog/guarddog","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-23531","title":"Arbitrary file write when scanning a specially-crafted local PyPI package","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.","status":"published","published":"2022-12-16T23:41:15.078Z","modified":"2025-04-17T14:33:54.287Z","cvss":[{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"medium","assessor":"cna"}],"cwes":["CWE-23"],"updated_at":"2026-11-02T14:34:29.842547Z"}],"euvd":[{"id":"EUVD-2022-0118","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.","status":"published","published":"2022-12-16T23:41:15Z","modified":"2025-04-17T14:33:54Z","cvss":[{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"medium"}],"updated_at":"2026-11-02T20:52:21.593744Z"}],"ghsa":[{"id":"GHSA-rp2v-v467-q9vq","title":"GuardDog vulnerable to arbitrary file write when scanning a specially-crafted PyPI package","description":"### 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","status":"published","published":"2022-12-02T22:25:25Z","modified":"2024-11-18T16:26:29Z","cvss":[{"version":"4.0","score":2.3,"vector":"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","level":"low"},{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-22","CWE-23"],"updated_at":"2026-11-02T14:38:19.029049Z"}],"nvd":[{"id":"CVE-2022-23531","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.","status":"published","published":"2022-12-17T00:15:08.643Z","modified":"2026-06-17T04:30:18.4Z","cvss":[{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"medium","assessor":"secondary"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-23","CWE-22"],"updated_at":"2026-11-02T14:07:34.031641Z"}],"osv":[{"id":"CVE-2022-23531","title":"Arbitrary file write when scanning a specially-crafted local PyPI package","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.","status":"published","published":"2022-12-16T23:41:15.078Z","modified":"2026-10-28T02:30:27.44200221Z","cvss":[{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-23"],"updated_at":"2026-11-02T15:44:24.061177Z"},{"id":"GHSA-rp2v-v467-q9vq","title":"GuardDog vulnerable to arbitrary file write when scanning a specially-crafted PyPI package","description":"### 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","status":"published","published":"2022-12-02T22:25:25Z","modified":"2026-02-22T22:55:57.366884Z","cvss":[{"version":"3.1","score":5.8,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"medium"},{"version":"4.0","score":2.3,"vector":"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","level":"low"}],"cwes":["CWE-22","CWE-23"],"updated_at":"2026-11-02T15:46:56.281047Z"},{"id":"PYSEC-2022-42994","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.","status":"published","published":"2022-12-17T00:15:00Z","modified":"2026-02-22T22:48:54.447356Z","updated_at":"2026-11-02T15:52:53.449407Z"}]}}
