CVE-2026-44972: GuardDog Unsanitized Human-readable Scan Output Allows Vulnerability
MODERATECVE-2026-44972 is a MODERATE (CVSS 5.0) unsanitized human-readable scan output allows vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting GuardDog libraries in the PyPI ecosystem. The issue involves unsanitized human-readable scan output allows terminal escape injection from malicious package content. Remediation is available in the latest vendor maintenance releases.
CVE-2026-44972 at a Glance
Security Impact
CVSS: 5.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2026-44972
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.
pip install guarddog>=Latest secure release
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-44972, 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-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. 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
CVE-2026-44972 Affected GuardDog Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
guarddog
|
PyPI |
≥ 2.6.0
≤ 2.9.0
|
|
References
Frequently Asked Questions
What is CVE-2026-44972?
Which GuardDog versions are affected?
What version fixes CVE-2026-44972?
Is guarddog affected?
What is the CVSS score of CVE-2026-44972?
What CWE is associated with CVE-2026-44972?
How can I check PyPI dependencies for CVE-2026-44972?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m5p4-gvpx-4mvr",
"modified" : "2026-06-08T23:42:18Z",
"published" : "2026-05-11T14:43:43Z",
"aliases" : [ "CVE-2026-44972" ],
"summary" : "GuardDog: Unsanitized human-readable scan output allows terminal escape injection from malicious package content",
"details" : "# Summary\nGuardDog 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.\n\n# Description\nThe finding formatter stores file paths and snippets from scanned content:\n\n```python\nlocation = file_path + \":\" + str(start_line)\nfinding = {\n \"location\": location,\n \"code\": code,\n \"message\": result[\"extra\"][\"message\"],\n}\n```\n\nThe human-readable reporter later prints these values directly:\n\n```python\n\" * \" + finding[\"message\"] + \" at \" + finding[\"location\"] + \"\\n \" + _format_code_line_for_output(finding[\"code\"])\n```\n\nNo escaping is applied for control characters such as `\\x1b`. A malicious package can therefore ship a filename like:\n\n```text\nevil\\x1b[2J.py\n```\n\nor matched source lines containing terminal escapes, which survive into the final CLI output.\n\n# Reproduction summary\n1. Create a file whose name contains `\\x1b[2J`.\n2. Feed a semgrep-style result referencing that file into `Analyzer._format_semgrep_response()`.\n3. Render the result with `HumanReadableReporter.print_scan_results()`.\n4. The output string contains the raw escape bytes, which a terminal may interpret.\n\n# Key code paths\n- `guarddog/analyzer/analyzer.py:377-392`\n- `guarddog/reporters/human_readable.py:36-42`\n- `guarddog/reporters/human_readable.py:84-91`\n\n# Practical impact\nThis can be used to:\n- clear or rewrite analyst terminal output\n- inject misleading or spoofed log content in CI\n- emit clickable OSC 8 hyperlinks or title changes in compatible terminals\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\nEscape or strip terminal control characters before rendering any attacker-controlled value in human-readable output. This should cover package names, file paths, messages, and code snippets.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "guarddog"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.6.0"
}, {
"last_affected" : "2.9.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/DataDog/guarddog/security/advisories/GHSA-m5p4-gvpx-4mvr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44972"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/DataDog/guarddog"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-116" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-11T14:43:43Z",
"nvd_published_at" : "2026-05-27T15:16:29Z"
}
}