OS Command Injection in @ooples/token-optimizer-mcp (CVE-2026-55157)
Summary
OS command injection in @ooples/token-optimizer-mcp (CVE-2026-55157). Successful exploitation can lead to full system takeover. Exploitable via smart_user. Mitigation: upgrade to 5.1.0 or later.
Original description
The description as published by the source.
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 shel…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-55157 has been found in @ooples/token-optimizer-mcp.
Attackers can target a specific entry point like smart_user over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 8.4/10.
What to do: upgrade @ooples/token-optimizer-mcp to 5.1.0 or later.
If unsure, ask your IT team or search "@ooples/token-optimizer-mcp CVE-2026-55157" on the vendor's site.
CVE-2026-55157 (@ooples/token-optimizer-mcp) — CWE-78 / CVSS v3 8.4
Attack vector: local / unauthenticated / no user interaction
Attack surface: smart_user / username / getent / grep
Patched: 5.1.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
OS command injection (CWE-78) exists in @ooples/token-optimizer-mcp. Attackers reach the vulnerable code path via smart_user without authentication.
Check the vendor advisory for the affected versions of @ooples/token-optimizer-mcp. Attack surface: smart_user / username / getent / grep.
Severity: High (CVSS 8.4/10). Successful exploitation can lead to full system takeover.
Update to 5.1.0.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r '@ooples/token-optimizer-mcp' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r '@ooples/token-optimizer-mcp' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
@ooples/token-optimizer-mcpを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade @ooples/token-optimizer-mcp to 5.1.0ステージング環境で 5.1.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com