Junglewise Threat Intelligence

CVE-2026-19268: MCPGateway command injection in Claude usage endpoint

CVE-2026-19268 · Severity: medium · CVSS 6.3 · Published 2026-08-08

Executive brief

MCPGateway is an open-source MCP server that routes requests to various tools and services. When the Claude Usage dashboard feature is enabled, an attacker can inject arbitrary shell commands through the `/api/claude-usage/range` endpoint by crafting malicious date parameters, allowing remote code execution on the server hosting the application.

Technical details

The vulnerability is a command injection flaw in the `getUsageByDateRange` function within `src/services/claude-usage.ts`. The code constructs a shell command by directly concatenating unsanitized `since` and `until` query parameters into a string (`npx ccusage@latest --json --since ${since} --until ${until}`), then executes it via `execAsync()`. Because the parameters are not validated as date strings and are not passed through a safe argument-vector API (like `spawn` or `execFile`), an attacker can inject shell metacharacters to execute arbitrary commands. The attack is remotely exploitable and requires only the Claude Usage dashboard feature to be enabled. No patch has been released, and the project maintainer has not yet responded to the early disclosure.

Affected products

  • abdullah1854 MCPGateway up to commit 549f494a9e363f40530149de324b8097de424230

Timeline

  • 2026-08-08: disclosed

References