CVE-2022-23530 json
GuardDog vulnerable to arbitrary file write when scanning a specially-crafted remote PyPI package
published 2022-12-05 3 y ago modified 2026-06-17 4 mo ago also GHSA-78m5-jpmf-ch7v , PYSEC-2022-42993 , EUVD-2022-0117
- cvss
- 5.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.8%
- EPSS 0.8% chance of exploitation in 30 days, percentile 55%
- public exploits
- 0
- none known
Summary
GuardDog is a CLI tool to identify malicious PyPI packages. Versions prior to v0.1.8 are vulnerable to arbitrary file write when scanning a specially-crafted remote PyPI package. Extracting files using shutil.unpack_archive() from a potentially malicious tarball without validating that the destination file path is within the intended destination directory can cause files outside the destination directory to be overwritten. This issue is patched in version 0.1.8. Potential workarounds include using a safer module, like zipfile, and validating the location of the extracted files and discarding those with malicious paths.
Patch / fix
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 18 mo ago
Exploit prediction
0.75% chance of exploitation in the next 30 days, higher than 55% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/DataDog/guarddog/security/advisories/GHSA-78m5-jpmf-ch7v referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/DataDog/guarddog/blob/a1d064ceb09d39bb28deb6972bc0a278756ea91f/guarddog/scanners/package_scanner.py#L153..158 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L |
| NVD | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| GitHub | 3.1 | 5.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | guarddog | <0.1.8 |
0.1.8 |
Affected products
- DataDog guarddog
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/DataDog/guarddog/commit/37c7d0767ba28f4df46117d478f97652594c491c
web, patch, third-party-advisory
-
github.com
/DataDog/guarddog/security/advisories/GHSA-78m5-jpmf-ch7v
web, exploit, third-party-advisory, advisory
-
github.com
/DataDog/guarddog/blob/a1d064ceb09d39bb28deb6972bc0a278756ea91f/guarddog/scanners/package_scanner.py#L153..158
web, exploit, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-23530
advisory
-
github.com
/DataDog/guarddog
package
-
github.com
/pypa/advisory-database/tree/main/vulns/guarddog/PYSEC-2022-42993.yaml
web
Sources
- CVE List CVE-2022-23530
- GitHub Advisory GHSA-78m5-jpmf-ch7v
- NVD CVE-2022-23530
- OSV PYSEC-2022-42993
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.