GHSA-rp2v-v467-q9vq

Source
https://github.com/advisories/GHSA-rp2v-v467-q9vq
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/12/GHSA-rp2v-v467-q9vq/GHSA-rp2v-v467-q9vq.json
Aliases
Published
2022-12-02T22:25:25Z
Modified
2024-02-16T08:05:59.819422Z
Details

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
References

Affected packages

PyPI / guarddog

Package

Name
guarddog

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0The exact introduced commit is unknown
Fixed
0.1.5

Affected versions

0.*

0.1.1
0.1.3
0.1.4