CVE-2026-101057
utcp-mcp 1.1.2 skips secure URL validation, allowing plain‑HTTP MCP handshakes.
- CVSS 2.3
- CWE-319
- Input Validation and Sanitization
- Remote
utcp-mcp (the MCP plugin of python-utcp) through 1.1.2 connects to the HTTP and WebSocket MCP server URLs given in a call template's mcpServers configuration without the ensure_secure_url validation that the HTTP-family plugins apply, so the HTTPS/WSS-or-loopback rule is not enforced. A call template naming a plain-HTTP, non-loopback MCP server URL is dialed as configured, exposing the MCP handshake to network interception and permitting cleartext connections to internal hosts. The mcpServers configuration is operator-authored rather than remote data, and the connection is an MCP handshake rather than an arbitrary request returning a body, which limits practical exploitation; the OAuth2 token_url credential path described in the original report was not reachable in the affected versions, because the OAuth2 handler was never invoked and the call template's auth field was not read. Fixed in utcp-mcp 1.1.3, which validates server URLs before any connection is made.
- CWE
- CWE-319
- CVSS base score
- 2.3
- Published
- 2026-09-27
- OWASP
- A02 Cryptographic Failures
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Input Validation and Sanitization
- Subcategory
- Insecure Parsing or Deserialization
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Affected component
- utcp-mcp
- Fixed by upgrading
- Yes
Solution
Upgrade utcp-mcp to version 1.1.3.
Vulnerable code sample
import urllib.parse
import socket
def connect_mcp(call_template):
"""
Connect to the MCP server(s) defined in the call template.
call_template is a dict with a key 'mcpServers' containing a list of URLs.
"""
servers = call_template.get('mcpServers', [])
for url in servers:
# VULNERABLE: no validation of scheme or host, allows plain HTTP to external hosts
parsed = urllib.parse.urlparse(url)
# socket.create_connection expects a (host, port) tuple
host, port = parsed.hostname, parsed.port or (443 if parsed.scheme == 'https' else 80)
sock = socket.create_connection((host, port))
# Perform minimal MCP handshake (placeholder)
sock.sendall(b"MCP/1.0\r\n\r\n")
resp = sock.recv(1024)
sock.close()Patched code sample
import urllib.parse
import socket
def connect_mcp(call_template):
"""
Connect to the MCP server(s) defined in the call template.
call_template is a dict with a key 'mcpServers' containing a list of URLs.
"""
servers = call_template.get('mcpServers', [])
for url in servers:
# FIX: enforce HTTPS/WSS or loopback-only URLs
parsed = urllib.parse.urlparse(url)
if parsed.scheme not in ('https', 'wss'):
raise ValueError("Insecure scheme: only HTTPS/WSS allowed")
if parsed.hostname not in ('127.0.0.1', '::1', 'localhost'):
raise ValueError("Remote host not allowed for MCP")
host, port = parsed.hostname, parsed.port or (443 if parsed.scheme == 'https' else 443)
sock = socket.create_connection((host, port))
# Perform minimal MCP handshake (placeholder)
sock.sendall(b"MCP/1.0\r\n\r\n")
resp = sock.recv(1024)
sock.close()Cite this entry
@misc{vaitp:cve2026101057,
title = {{utcp-mcp 1.1.2 skips secure URL validation, allowing plain‑HTTP MCP handshakes.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-101057},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-101057/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
