GHSA-rp2v-v467-q9vq

Suggest an improvement
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
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-rp2v-v467-q9vq
Aliases
Published
2022-12-02T22:25:25Z
Modified
2024-11-20T05:24:54.286137Z
Severity
  • 5.8 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L CVSS Calculator
  • 2.3 (Low) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:L/SC:L/SI:L/SA:L CVSS Calculator
Summary
GuardDog vulnerable to arbitrary file write when scanning a specially-crafted PyPI package
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
Database specific
{
    "nvd_published_at": "2022-12-17T00:15:00Z",
    "cwe_ids": [
        "CWE-22",
        "CWE-23"
    ],
    "severity": "LOW",
    "github_reviewed": true,
    "github_reviewed_at": "2022-12-02T22:25:25Z"
}
References

Affected packages

PyPI / guarddog

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.1.5

Affected versions

0.*

0.1.1
0.1.3
0.1.4