Advisories for Pypi/Guarddog package

2026

GuardDog: Unsanitized human-readable scan output allows terminal escape injection from malicious package content

GuardDog includes attacker-controlled filenames, file locations, messages, and code snippets in its default human-readable output without escaping terminal control characters. A malicious package can therefore inject ANSI or OSC escape sequences into analyst terminals or CI logs. Create a file whose name contains \x1b[2J. Feed a semgrep-style result referencing that file into Analyzer._format_semgrep_response(). Render the result with HumanReadableReporter.print_scan_results(). The output string contains the raw escape bytes, which a terminal may …

GuardDog has a blind GitHub URL rewrite in remote project scanning causes SSRF and `GH_TOKEN` exfiltration

The programmatic remote project scanning path rewrites attacker-controlled repository URLs using a blind string replacement and then sends the caller's GitHub credentials with the resulting request. This allows an attacker who can influence the scanned repository URL to trigger SSRF and capture the GH_TOKEN used by GuardDog. Start an HTTP listener on 127.0.0.1:18081 that logs the request path and Authorization header. Set GIT_USERNAME=alice and GH_TOKEN=supersecret. Call PypiRequirementsScanner().scan_remote("http://github@127.0.0.1:18081/owner/repo", "main", "requirements.txt"). Observe …

2022

GuardDog vulnerable to arbitrary file write when scanning a specially-crafted PyPI package

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