Advisories for Npm/@Ooples/Token-Optimizer-Mcp package

2026

Token Optimizer MCP: Unauthenticated Path Traversal in Dashboard Session Log API Endpoints

The dashboard HTTP server in token-optimizer-mcp exposes /api/session-summary and /api/session-events with no authentication middleware — any network-accessible client can reach them without credentials. Both handlers concatenate the caller-supplied sessionId query parameter directly into a filesystem path via path.join, and Node.js normalizes .. segments at resolution time, allowing an unauthenticated attacker to read any .jsonl file reachable from the server's filesystem. Successful reproduction confirmed exfiltration of a .jsonl file located outside …

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

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 …