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

- Priority: **Routine**
- Reason: Not severe (CVSS 5.8, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2022-12-16 · Modified: 2025-04-17
- Aliases: GHSA-78m5-jpmf-ch7v, PYSEC-2022-42993
- Record: https://cvemate.com/vulnerability/CVE-2022-23530 · JSON: https://cvemate.com/vulnerability/CVE-2022-23530/json

## Description

```text
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.
```

## Signals

- CVSS: 6.5 medium (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
- EPSS: 0.778%, percentile 57.226%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- datadog guarddog: \< 0.1.8
- datadoghq guarddog: \< 0.1.8
- PyPI guarddog (PyPI): \< 37c7d0767ba28f4df46117d478f97652594c491c \| \< 0.1.8

## References

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

---

Data as of 2026-12-05T04:39:02.591Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
