Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-19268

CVE-2026-19268: MCPGateway Command Injection Vulnerability

CVE-2026-19268 is a command injection flaw in MCPGateway's Claude Usage Range Endpoint allowing remote code execution. This article covers the technical details, affected versions, and mitigation strategies.

Published:

CVE-2026-19268 Overview

CVE-2026-19268 is a command injection vulnerability in the abdullah1854 MCPGateway project, affecting builds up to commit 549f494a9e363f40530149de324b8097de424230. The flaw resides in the getUsageByDateRange function within src/services/claude-usage.ts, part of the Claude Usage Range Endpoint component. An authenticated remote attacker can manipulate the since argument to inject operating system commands into the underlying process. The project follows a continuous-delivery model with rolling releases, so no fixed version has been published. A public exploit exists, and the maintainer has not responded to the disclosure issue.

Critical Impact

Authenticated remote attackers can inject arbitrary operating system commands through the since parameter of the Claude Usage Range Endpoint, with a public exploit already available.

Affected Products

  • abdullah1854 MCPGateway up to commit 549f494a9e363f40530149de324b8097de424230
  • Component: Claude Usage Range Endpoint
  • File: src/services/claude-usage.ts

Discovery Timeline

  • 2026-08-08 - CVE-2026-19268 published to NVD
  • 2026-08-12 - Last updated in NVD database

Technical Details for CVE-2026-19268

Vulnerability Analysis

The vulnerability is classified under CWE-74 as improper neutralization of special elements in output used by a downstream component, and specifically manifests as command injection. The getUsageByDateRange function in src/services/claude-usage.ts accepts a since argument that flows into a system command without adequate sanitization. Because MCPGateway exposes this logic through the Claude Usage Range Endpoint, an attacker who can reach the API can supply crafted shell metacharacters in the since parameter. The injected payload executes in the context of the MCPGateway process. According to the advisory, a public exploit is available and the maintainer has not yet acknowledged the disclosure filed via the project issue tracker.

Root Cause

The root cause is unsanitized concatenation of the since argument into a command executed by the Node.js runtime. Input validation and safe command-execution APIs, such as parameterized execFile calls with argument arrays, are not enforced before the value reaches the shell.

Attack Vector

Exploitation is network-based and requires low-privileged authentication. The attacker sends a request to the Claude Usage Range Endpoint with a malicious since parameter containing shell control characters. The MCPGateway process interprets the payload and executes the attacker-supplied commands. See the VulDB entry for CVE-2026-19268 and the MCPGateway issue tracker for further technical context.

No verified proof-of-concept code is reproduced here. Refer to the VulDB vulnerability details for exploit specifics.

Detection Methods for CVE-2026-19268

Indicators of Compromise

  • Requests to the Claude Usage Range Endpoint containing shell metacharacters such as ;, |, &&, backticks, or $(...) in the since parameter.
  • Unexpected child processes spawned by the MCPGateway Node.js runtime, especially shells like /bin/sh or /bin/bash.
  • Outbound network connections from the MCPGateway host to unfamiliar IP addresses shortly after usage-range API calls.

Detection Strategies

  • Log and inspect all HTTP requests to endpoints handled by getUsageByDateRange, alerting on non-ISO-8601 values in since.
  • Deploy runtime process monitoring to flag when the MCPGateway process forks shell interpreters or system utilities such as curl, wget, or nc.
  • Correlate authentication logs with anomalous usage-range queries to identify low-privileged accounts probing the endpoint.

Monitoring Recommendations

  • Enable verbose application logging for the claude-usage.ts service and forward logs to a centralized SIEM for anomaly analysis.
  • Establish a baseline of expected child processes for MCPGateway and alert on deviations.
  • Monitor the MCPGateway GitHub repository for maintainer responses or patch commits addressing this issue.

How to Mitigate CVE-2026-19268

Immediate Actions Required

  • Restrict network exposure of MCPGateway so the Claude Usage Range Endpoint is not reachable from untrusted networks.
  • Revoke or rotate credentials of low-privileged accounts that do not require access to usage analytics endpoints.
  • Apply input validation at a reverse proxy or WAF layer to reject since values that do not match a strict date format.

Patch Information

At the time of publication, no vendor patch is available. The project uses continuous delivery with rolling releases and, according to the advisory, has not responded to the issue report. Track fixes in the MCPGateway repository and the associated issue.

Workarounds

  • Fork MCPGateway and modify getUsageByDateRange in src/services/claude-usage.ts to validate since against an ISO-8601 regular expression before use.
  • Replace any shell-based command invocation with child_process.execFile and pass parameters as an argument array rather than a concatenated string.
  • Run the MCPGateway process under a dedicated, unprivileged system account with restricted filesystem and network permissions to limit blast radius.
bash
# Configuration example: reject non-ISO-8601 'since' values at an nginx reverse proxy
location /api/usage/range {
    if ($arg_since !~ "^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9:]+Z?)?$") {
        return 400;
    }
    proxy_pass http://mcpgateway_upstream;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.