Skip to content

CVE-2026-108716: mcp-remote Cleartext Credential Transmission via --device-code OAuth Grant

Density:
C-Level Executive Briefing CVE-2026-108716 CRITICAL SCORE 94/100

Critical OAuth bearer token leak in mcp-remote via unencrypted HTTP and world-readable cache, allowing full takeover of remote Model Context Protocol agent sessions.

AGENTIC

HERMES AGENTIC SECURITY SCORE & MODEL CONTEXT PROTOCOL EVALUATION

Target: mcp-remote Proxy Client โ€” OAuth 2.0 Device Code Token Exchange Subsystem
Confidence: 98%
93 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Autonomy 17 / 20
Tool Access 20 / 20
Privilege 15 / 20
Persistence 13 / 20
External Impact 14 / 20
Propagation 14 / 20
โš–๏ธ Divergence & Operational Rationale

CVSS v3.1 rates this vulnerability at 9.4 (CRITICAL) due to the scope change (S:C) enabling cross-system compromise of remote Model Context Protocol (MCP) servers and LLM tool execution runtimes. The Hermes Agentic Security Score (HASS) elevates this evaluation to 93 (CRITICAL). In agentic workflows, MCP clients act as high-privilege proxies executing filesystem writes, shell commands, database queries, and cloud API interactions. Eavesdropping or extracting plaintext OAuth session tokens allows unprivileged adversaries to impersonate developer agents and invoke arbitrary tools on upstream MCP servers.

๐Ÿ•ธ๏ธ Connected Knowledge Graph & Provenance

CVE-2026-108716: mcp-remote Cleartext Credential Transmission via --device-code OAuth GrantVULNERABILITY

Connected Nodes: 1
Active Relationships (Outgoing)
→ affectsPRODUCTmcp-remote Proxy Client
98% VERY_HIGH

Software platform affected by security vulnerabilities and agentic attack patterns.

๐Ÿ” Why is this related? (Evidence & Provenance)

“Confirmed security vulnerability in mcp-remote Proxy Client documented in Hermes dossier.”

Supporting Verified Evidence:

The Model Context Protocol (MCP) standardizes how LLMs interface with external data sources, developer tools, and operational environments. mcp-remote acts as the secure tunnel client bridging local IDEs and agents with remote servers.

ParameterTechnical SpecificationOperational Details
CVE IdentifierCVE-2026-108716Canonical vulnerability tracking identifier
Affected Productmcp-remoteRemote Model Context Protocol client proxy
Vulnerable Componentsrc/auth/device-flow.tsOAuth 2.0 device flow polling and token cache engine
Impacted Versions0.8.0 through 0.14.3Developer workstations, CI/CD runners, and agent containers
Corrective Release0.14.4Enforced HTTPS, PKCE verification, and secure memory-only tokens
Vulnerability ClassCleartext Transmission / Insecure Storage (CWE-319, CWE-732)Unencrypted transport fallback and world-readable cache
Execution ContextNode.js / TypeScript / npmAutonomous agent developer environments

Vulnerable Code Path: Insecure Transport Fallback & Unprotected Temporary Cache

Section titled โ€œVulnerable Code Path: Insecure Transport Fallback & Unprotected Temporary Cacheโ€

During device authorization, mcp-remote queries the OAuth token endpoint in a polling loop until the user completes web authorization. In src/auth/device-flow.ts:

src/auth/device-flow.ts
import * as fs from 'fs';
import * as path from 'path';
export async function pollDeviceToken(deviceCode: string, tokenUrl: string) {
// FLAW 1: Silently permits downgrade to plaintext HTTP if target port is non-standard
const transportUrl = tokenUrl.replace(/^https:/, 'http:'); // Permissive HTTP fallback!
const response = await fetch(transportUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: `grant_type=urn:ietf:params:oauth:grant-type:device_code&device_code=${deviceCode}`
});
const tokenData = await response.json();
if (tokenData.access_token) {
// FLAW 2: Saves token in shared /tmp with default umask (0644 - world readable!)
const cachePath = path.join('/tmp', `mcp-session-${deviceCode.slice(0, 8)}.json`);
fs.writeFileSync(cachePath, JSON.stringify(tokenData)); // Readable by any user on host
return tokenData.access_token;
}
}
Developer / AI Agent Local OS / Shared /tmp Attacker / Local User Remote MCP Server
+---------------------+ +--------------------+ +---------------------+ +-------------------+
| Runs mcp-remote | | | | | | |
| --device-code | ----------> | Writes session | | Reads session file | | |
| | | /tmp/mcp-*.json | ----------> | Obtains access_token| | |
| Completes Auth | | (Permissions 0644) | | | | |
+---------------------+ +--------------------+ +---------------------+ +-------------------+
| ^
| Direct MCP JSON-RPC Request |
| with stolen Bearer token |
+----------------------------------+
| {"method": "tools/call",
| "name": "execute_bash",
| "args": {"cmd": "id; uname -a"}}

  1. Device Flow Initiation: A developer or automated CI workflow runs mcp-remote --server https://mcp.enterprise.internal/sse --device-code to authenticate an autonomous agent to enterprise tools.
  2. Plaintext Eavesdropping or Local Cache Sniffing: On a shared development server or multi-tenant Kubernetes pod node, an unprivileged attacker inspects /tmp for mcp-session-*.json files or sniffs the local loopback/egress segment for HTTP token responses.
  3. Session Token Exfiltration: The adversary extracts the OAuth access token (ey...) and refresh token before the victim completes their task.
  4. Autonomous MCP Tool Invocation: The attacker directly establishes a WebSocket or SSE session to https://mcp.enterprise.internal/sse using the stolen credentials, executing arbitrary tools (tools/call) including shell execution and database mutations.

title: Insecure mcp-remote Temporary Session Token File Access
id: d1789c02-4781-4328-9811-202610871601
status: experimental
description: Detects unauthorized processes reading world-readable mcp-remote session token files in temporary directories.
references:
- https://vulncheck.com/advisories/mcp-remote-0.8.0-through-0.14.3-cleartext-credential-transmission-via-device-code-oauth-grant
author: Hermes Codex CTI Team
date: 2026/10/12
logsource:
category: file_access
product: linux
detection:
selection_target:
TargetFilename|startswith: '/tmp/mcp-session-'
TargetFilename|endswith: '.json'
filter_legit:
Image|endswith:
- '/node'
- '/mcp-remote'
condition: selection_target and not filter_legit
fields:
- ProcessId
- Image
- CommandLine
- TargetFilename
level: high
tags:
- attack.credential_access
- attack.t1552.001

Upgrade mcp-remote to version 0.14.4 or later:

Terminal window
npm install -g mcp-remote@latest

Verify that installed mcp-remote versions enforce TLS and secure storage:

Terminal window
mcp-remote --version
# Expected output: >= 0.14.4

In version 0.14.4, tokens are stored with strict 0600 file modes in $XDG_RUNTIME_DIR or memory buffers, and HTTP connections are strictly rejected.