DatadogGHSA-rp2v-v467-q9vq
Arbitrary file write when scanning a specially-crafted local PyPI package
Fix: upgrade to v0.1.5 or later
Impact
Running GuardDog against a specially-crafted package can allow an attacker to write an arbitrary file on the machine where GuardDog is executed.
This 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
Remediation
Upgrade to GuardDog v0.1.5 or more recent.
References
- https://semgrep.dev/r?q=trailofbits.python.tarfile-extractall-traversal.tarfile-extractall-traversal
- https://www.trellix.com/en-us/about/newsroom/stories/research/tarfile-exploiting-the-world.html
- https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| guarddog PyPI | < v0.1.5 | v0.1.5 |
Details and references
- CVSS 3.1
- CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-23
More Datadog advisories
All DatadogCVE-2026-22871Jan 13Path Traversal Vulnerability Leads to Arbitrary File Overwrite and RCEHighFixed in 2.7.1CVE-2026-22870Jan 13Zip Bomb Vulnerability in safe_extract() Allows DoSHighFixed in 2.7.1CVE-2025-61667Nov 11, 2025Datadog Linux Host Agent affected by local privilege escalation due to insufficient pycache permissionsHigh7.0Fixed in 7.71.0CVE-2024-38525Jun 27, 2024Malformed unicode header values may throw uncaught exceptionMedium6.2Fixed in v0.2.2CVE-2022-23530Dec 5, 2022Arbitrary file write when scanning a specially-crafted remote PyPI packageMedium5.8Fixed in v0.1.8CVE-2021-21331Feb 24, 2021DataDog API Client contains a Local Information Disclosure VulnerabilityLowFixed in 1.0.0-beta.9