Skip to main content

GuardDog CVE-2026-44972

| EUVDEUVD-2026-32534 MEDIUM
Improper Encoding or Escaping of Output (CWE-116)
2026-05-11 https://github.com/DataDog/guarddog GHSA-m5p4-gvpx-4mvr
5.0
CVSS 3.1 · Vendor: https://github.com/DataDog/guarddog
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Craft malicious package with escape-sequence-containing filename
  2. Delivery
    Distribute via package repository or social engineering
  3. Exploit
    Analyst runs GuardDog scan on package
  4. Install
    Formatter captures attacker-controlled filename into finding structure
  5. C2
    Human-readable reporter concatenates unescaped strings
  6. Execute
    Terminal renders ANSI/OSC sequences
  7. Impact
    Attacker 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

guarddog 2.6.0, ≤ 2.9.0

Affected Packages

pypi guarddog no fix

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

Vendor (https://github.com/DataDog/guarddog) PRIMARY 5.0 MEDIUM
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

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

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:

python
location = file_path + ":" + str(start_line)
finding = {
    "location": location,
    "code": code,
    "message": result["extra"]["message"],
}

The human-readable reporter later prints these values directly:

python
"  * " + 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:

text
evil\x1b[2J.py

or matched source lines containing terminal escapes, which survive into the final CLI output.

Reproduction summary

  1. Create a file whose name contains \x1b[2J.
  2. Feed a semgrep-style result referencing that file into Analyzer._format_semgrep_response().
  3. Render the result with HumanReadableReporter.print_scan_results().
  4. The output string contains the raw escape bytes, which a terminal may interpret.

Key code paths

  • guarddog/analyzer/analyzer.py:377-392
  • guarddog/reporters/human_readable.py:36-42
  • guarddog/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

EPSS Score
0.0%
Top 98% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

25
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +25
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

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

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy