Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft malicious package with escape-sequence-containing filename
-
DeliveryDistribute via package repository or social engineering
-
ExploitAnalyst runs GuardDog scan on package
-
InstallFormatter captures attacker-controlled filename into finding structure
-
C2Human-readable reporter concatenates unescaped strings
-
ExecuteTerminal renders ANSI/OSC sequences
-
ImpactAttacker clears log or injects spoofed content
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding for downstream
|
| Exploitation Conditions | The vulnerability requires that GuardDog be run in human-readable output mode (the default) on a package containing attacker-controlled filenames or source code with terminal escape sequences. No special configuration is required; the default behavior of GuardDog output rendering to stdout makes any scanned package a potential attack vector. The exploit requires user interaction: an analyst or CI/CD system must explicitly invoke GuardDog to scan the malicious package. The terminal or log viewer must support ANSI or OSC escape sequence interpretation (nearly all modern terminals do). Limitations: exploitation is limited to output presented to the terminal or captured in logs; it cannot affect the underlying scanner logic, file system, or system beyond visual manipulation. JSON or XML output modes may bypass the vulnerability if used instead of human-readable mode. Non-terminal output redirects (e.g., piped to a tool that ignores escape sequences) may not be vulnerable depending on the downstream tool's escape handling. |
| Impact | This vulnerability presents moderate real-world risk despite a CVSS score of 5.0. The CVSS vector (AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N) correctly identifies it as a local attack requiring user interaction (UI:R - analyst running GuardDog on a malicious package) with low attack complexity and no privilege requirement. However, the practical impact is confined to confidentiality and integrity of the analyst's terminal session or CI log output, not system availability or code execution. The scope change (S:C) reflects that the integrity impact extends beyond the vulnerable component (GuardDog) into the analyst's environment (terminal or CI system logs). EPSS data is not provided, but the vulnerability lacks automatable exploitation against production systems - it requires a human analyst to manually run GuardDog on a distributed malicious package. The attack is not network-initiated; the malicious package must be explicitly downloaded and scanned. No patch version has been released as of the advisory date (2026-03-18), elevating the risk for users who actively use GuardDog in security scanning workflows. Organizations relying on GuardDog output for security decisions (especially in CI/CD pipelines) face elevated risk of log manipulation or misleading findings presentation. The vulnerability is realistic but contextual: low impact if GuardDog output is not trusted as a control point, higher if it influences security decisions or is captured in immutable logs. |
| Exploit ScenarioDerived | A security researcher maintains a tool on PyPI that genuinely provides value but includes a malicious package with a filename containing \x1b[2J (ANSI clear screen code). When a CI/CD pipeline runs GuardDog to scan this package as part of security checks, GuardDog parses the filename and includes it in the human-readable scan report. The report is printed to stdout in the CI log. The ANSI escape sequence is interpreted by the CI system's terminal renderer, clearing the entire output buffer and potentially rewriting previous security findings, making it appear that critical vulnerabilities were never detected. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 11, 2026
GuardDog versions 2.6.0 through 2.9.0 fail to escape terminal control characters in human-readable scan output, allowing malicious packages to inject ANSI or OSC escape sequences that can clear analyst terminals, rewrite CI logs, or inject spoofed content. The vulnerability affects file paths, code snippets, and messages parsed from package content and rendered directly to stdout without sanitization. Remote attackers can exploit this by distributing packages with specially crafted filenames or source code containing escape sequences, and requires only user interaction (running the scanner on the malicious package).
RemediationAI
No vendor-released patch version has been identified at time of analysis. Users should upgrade to a patched version once released by DataDog. In the interim, apply strict input sanitization at the terminal level: pipe GuardDog output through a terminal escape filter tool (e.g., cat with terminal control character stripping, or piping through sed or similar to remove \x1b sequences) before displaying or logging, especially in CI/CD systems. Alternatively, configure GuardDog to output in JSON or XML format (if supported) instead of human-readable text, then parse and display the structured output with proper escaping applied by your log aggregation or display system. Restrict package scanning to trusted sources only, and disable scanning of user-supplied packages in critical security workflows until patching is available. Monitor the DataDog GuardDog repository and GitHub Advisory GHSA-m5p4-gvpx-4mvr for patch release notifications.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
GuardDog is a Python static analysis tool that scans software packages for security issues using Semgrep-style pattern matching. The vulnerability exists in the finding formatter and human-readable reporter components. The formatter collects file paths, line numbers, code snippets, and messages from analysis results into a data structure, then the reporter concatenates these attacker-controlled strings directly into output strings passed to print() without applying any terminal escape character filtering. The root cause is improper neutralization of special elements used in an OS command (CWE-116), specifically ANSI escape codes (ESC sequences like \x1b[2J for screen clear or \x1b[m for text formatting) and OSC sequences (like OSC 8 for hyperlinks). These are interpreted by compatible terminals when rendered, allowing output manipulation. The affected code paths in guarddog/analyzer/analyzer.py (lines 377-392) and guarddog/reporters/human_readable.py (lines 36-42, 84-91) construct and print findings without invoking any escape or strip functions.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Primary rating from Vendor (https://github.com/DataDog/guarddog) · only source for this CVE.
CVSS VectorVendor: https://github.com/DataDog/guarddog
DescriptionCVE.org
Summary
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.
Description
The finding formatter stores file paths and snippets from scanned content:
location = file_path + ":" + str(start_line)
finding = {
"location": location,
"code": code,
"message": result["extra"]["message"],
}The human-readable reporter later prints these values directly:
" * " + finding["message"] + " at " + finding["location"] + "\n " + _format_code_line_for_output(finding["code"])No escaping is applied for control characters such as \x1b. A malicious package can therefore ship a filename like:
evil\x1b[2J.pyor matched source lines containing terminal escapes, which survive into the final CLI output.
Reproduction summary
- 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 interpret.
Key code paths
guarddog/analyzer/analyzer.py:377-392guarddog/reporters/human_readable.py:36-42guarddog/reporters/human_readable.py:84-91
Practical impact
This can be used to:
- clear or rewrite analyst terminal output
- inject misleading or spoofed log content in CI
- emit clickable OSC 8 hyperlinks or title changes in compatible terminals
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
Escape 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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-32534
GHSA-m5p4-gvpx-4mvr
NVD
CVE.org
EPSS
Exploit-DB