Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @ooples/token-optimizer-mcp
  4. ›
  5. CVE-2026-55157

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

August 14, 2026

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.


References

  • github.com/advisories/GHSA-49mq-fc6q-3h46
  • github.com/ooples/token-optimizer-mcp/commit/b4ee96dac799cbfba0a9f9c17844ce9d613cbcc7
  • github.com/ooples/token-optimizer-mcp/releases/tag/v5.1.0
  • github.com/ooples/token-optimizer-mcp/security/advisories/GHSA-49mq-fc6q-3h46
  • nvd.nist.gov/vuln/detail/CVE-2026-55157

Code Behaviors & Features

Detect and mitigate CVE-2026-55157 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 5.1.0

Fixed versions

  • 5.1.0

Solution

Upgrade to version 5.1.0 or above.

Impact 8.4 HIGH

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Source file

npm/@ooples/token-optimizer-mcp/CVE-2026-55157.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 15 Aug 2026 00:23:37 +0000.