# CVE-2022-23530: GuardDog vulnerable to arbitrary file write when scanning a specially-crafted remote PyPI package

- Severity: Medium 5.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.80%, higher than 54% of CVEs (2026-11-30)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2022-12-05T23:34:43.000Z
- Modified: 2026-06-17T04:30:18.270Z
- Also known as: GHSA-78m5-jpmf-ch7v, PYSEC-2022-42993
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- DataDog guarddog: < 0.1.8
- guarddog (PyPI): before 0.1.8; before 37c7d0767ba28f4df46117d478f97652594c491c
- datadoghq guarddog: before 0.1.8

## Every score

- GitHub_M: CVSS:3.1 5.8 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L`
- GitHub: CVSS:3.1 5.8 Low `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L`
- GitHub: CVSS:4.0 Low `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`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`

## References

- <https://github.com/DataDog/guarddog/security/advisories/GHSA-78m5-jpmf-ch7v> (exploit, advisory, third-party-advisory, web)
- <https://github.com/DataDog/guarddog/blob/a1d064ceb09d39bb28deb6972bc0a278756ea91f/guarddog/scanners/package_scanner.py#L153..158> (exploit, third-party-advisory, web)
- <https://github.com/DataDog/guarddog/commit/37c7d0767ba28f4df46117d478f97652594c491c> (fix, patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-23530> (advisory)
- <https://github.com/DataDog/guarddog> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/guarddog/PYSEC-2022-42993.yaml> (web)

## Sources

- CVE List: [CVE-2022-23530](https://www.cve.org/CVERecord?id=CVE-2022-23530), CVE Terms of Use, modified 2025-04-17
- GitHub Advisory Database: [GHSA-78m5-jpmf-ch7v](https://github.com/advisories/GHSA-78m5-jpmf-ch7v), CC-BY-4.0, modified 2024-11-20
- NVD: [CVE-2022-23530](https://nvd.nist.gov/vuln/detail/CVE-2022-23530), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2022-42993](https://osv.dev/vulnerability/PYSEC-2022-42993), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2022-23530 · Whole record: https://cve.day/CVE-2022-23530.json · Rebuilt by cve.day 2026-11-25T22:58:17.652Z
