7.8
CWE
22 23
Advisory Published
CVE Published
Updated

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

First published: Fri Dec 02 2022(Updated: )

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

Credit: security-advisories@github.com security-advisories@github.com

Affected SoftwareAffected VersionHow to fix
Datadoghq Guarddog<0.1.5
pip/guarddog<0.1.5
0.1.5

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is CVE-2022-23531?

    CVE-2022-23531 is a vulnerability in the GuardDog CLI tool that allows an attacker to write an arbitrary file on the machine when scanning a specially-crafted local PyPI package.

  • What is the severity of CVE-2022-23531?

    CVE-2022-23531 has a severity rating of 7.8, which is considered high.

  • How does CVE-2022-23531 affect GuardDog?

    CVE-2022-23531 affects GuardDog versions prior to 0.1.5, allowing for Relative Path Traversal when scanning a specially-crafted local PyPI package.

  • How can I fix CVE-2022-23531?

    To fix CVE-2022-23531, you should update GuardDog to version 0.1.5 or newer.

  • Where can I find more information about CVE-2022-23531?

    More information about CVE-2022-23531 can be found in the GitHub repository and security advisories for GuardDog.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203