CVE-2026-22871High▾ TwilightGuardDog Path Traversal Vulnerability Leads to Arbitrary File Overwrite and RCE
▾ Twilight zone — High severity, or a signal on a lesser flaw
impact 41.3 · likelihood 0.2 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Jul 8.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
Last analysed / modified upstream
0.9%
0.9% → 1.1%
A path traversal vulnerability exists in GuardDog's safe_extract() function that allows malicious PyPI packages to write arbitrary files outside the intended extraction directory, leading to Arbitrary File Overwrite and Remote Code Execution on systems running GuardDog.
CWE: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)
File: guarddog/utils/archives.py
elif zipfile.is_zipfile(source_archive):
with zipfile.ZipFile(source_archive, "r") as zip:
for file in zip.namelist():
# Note: zip.extract cleans up any malicious file name
# such as directory traversal attempts This is not the
# case of zipfile.extractall
zip.extract(file, path=os.path.join(target_directory, file)) # ❌ VULNERABLE
The comment about zip.extract() fooled me at first :) then I noticed the os.path.join() call.
The vulnerability stems from incorrect usage of Python's zipfile.ZipFile.extract() API:
path parameter should be the target directory, not a full file pathextract() automatically appends the member name to the pathos.path.join(target_directory, file), GuardDog causes the filename to be appended twiceguarddog pypi scan malicious-pkgImpact depends on how GuardDog is running and under which environment.
Immediate Code Execution
~/.bashrc → executes on next shell~/.profile → executes on loginPersistent Backdoors
~/.ssh/authorized_keys → SSH access/etc/cron.d/malicious → scheduled execution (if root)and more...
Reported by: Charbel (dwbruijn)
guarddog < 2.7.1Upgrade to a patched release:
guarddog 2.7.1Connected by shared product, vendor, weakness, or advisory.
CVE-2026-44972Medium· 5.0GuardDog: Unsanitized human-readable scan output allows terminal escape injection from malicious package content
CVE-2026-44971High· 8.2GuardDog has a blind GitHub URL rewrite in remote project scanning causes SSRF and `GH_TOKEN` exfiltration
CVE-2026-22870HighGuardDog Zip Bomb Vulnerability in safe_extract() Allows DoS