{ "schema_version": "1.4.0", "id": "GHSA-rp2v-v467-q9vq", "modified": "2024-11-18T16:26:28Z", "published": "2022-12-02T22:25:25Z", "aliases": [ "CVE-2022-23531" ], "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", "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" } ], "affected": [ { "package": { "ecosystem": "PyPI", "name": "guarddog" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "0" }, { "fixed": "0.1.5" } ] } ] } ], "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" } ], "database_specific": { "cwe_ids": [ "CWE-22", "CWE-23" ], "severity": "LOW", "github_reviewed": true, "github_reviewed_at": "2022-12-02T22:25:25Z", "nvd_published_at": "2022-12-17T00:15:00Z" } }