AI and data stack advisories

46 critical this month · 282 projects

DatadogGHSA-rp2v-v467-q9vq

Arbitrary file write when scanning a specially-crafted local PyPI package

Datadog

CVE-2022-23531 · Published Nov 29, 2022 · updated Dec 15, 2022

Medium5.8
Fix: upgrade to v0.1.5 or later
GitHub advisory

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

PackageAffectedFixed in
guarddog
PyPI
< v0.1.5v0.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 Datadog