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

CVE-2026-55156: Token Optimizer MCP Path Traversal Flaw

CVE-2026-55156 is a path traversal vulnerability in Token Optimizer MCP that allows unauthenticated attackers to read sensitive files from the server filesystem. This post covers the technical details, affected versions, and mitigation.

Published:

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-55156 Overview

CVE-2026-55156 is a path traversal vulnerability [CWE-22] in token-optimizer-mcp, a Model Context Protocol (MCP) server that measures token savings and shares a local knowledge graph across AI coding agent CLI clients. Versions prior to 5.1.0 expose the /api/session-summary and /api/session-events endpoints on the dashboard HTTP server without any authentication middleware. The handlers concatenate a user-controlled sessionId query parameter into a filesystem path using path.join, which normalizes .. segments during resolution. An unauthenticated network-accessible attacker can read arbitrary .jsonl files reachable from the server process.

Critical Impact

Unauthenticated remote attackers can read arbitrary .jsonl files from the host filesystem, potentially exposing session logs, AI agent context, and sensitive local knowledge graph data.

Affected Products

  • token-optimizer-mcp versions prior to 5.1.0
  • Dashboard HTTP server component (src/server/web-server.ts)
  • Deployments exposing the dashboard to any network-accessible client

Discovery Timeline

  • 2026-09-28 - CVE-2026-55156 published to NVD
  • 2026-09-30 - Last updated in NVD database

Technical Details for CVE-2026-55156

Vulnerability Analysis

The token-optimizer-mcp dashboard runs an Express HTTP server that exposes two JSON endpoints for retrieving session data. Both endpoints accept a sessionId query parameter and build a filesystem path to locate the corresponding .jsonl session file. Neither endpoint enforces authentication, and neither validates or sanitizes the sessionId value before passing it to path.join. Because Node.js resolves .. segments during path construction, a caller can escape the intended session directory and reference files elsewhere on the host.

The scope is limited to files with a .jsonl extension that the Node.js process has permission to read. This restriction still permits disclosure of AI agent context stores, chat transcripts, command histories, and any other JSONL artifacts the server user can access.

Root Cause

Two defects combine to produce the vulnerability. First, the dashboard HTTP server has no authentication middleware on /api/session-summary or /api/session-events. Second, sessionId flows directly into path.join(baseDir, sessionId + '.jsonl') without allowlist checks or resolved-path validation against the intended base directory. Absence of a path.resolve boundary check leaves traversal segments effective.

Attack Vector

An attacker who can reach the dashboard port issues a GET request against /api/session-summary or /api/session-events with a crafted sessionId containing .. segments. The server returns the contents of the referenced .jsonl file. No credentials, prior session, or user interaction is required.

typescript
// Security patch in src/server/web-server.ts (excerpt)
import express from 'express';
import cors from 'cors';
import rateLimit from 'express-rate-limit';
import path from 'path';
import fs from 'fs';
import os from 'os';

Source: GitHub Commit b4ee96d

The patch introduces express-rate-limit alongside broader hardening across the server. Refer to the GHSA-76pc-mqxp-3rq5 advisory for the full remediation scope.

Detection Methods for CVE-2026-55156

Indicators of Compromise

  • HTTP GET requests to /api/session-summary or /api/session-events containing .., %2e%2e, or URL-encoded path separators in the sessionId parameter.
  • Responses returning .jsonl file contents that do not correspond to legitimate session identifiers issued by the dashboard.
  • Access to the dashboard port from source addresses outside expected developer or CI networks.

Detection Strategies

  • Inspect reverse proxy or web server access logs for sessionId query values containing traversal sequences or unusually long path fragments.
  • Alert on unauthenticated requests to dashboard API endpoints where authentication is expected after upgrade.
  • Correlate dashboard HTTP activity with process-level file reads of .jsonl files outside the configured session directory.

Monitoring Recommendations

  • Enable request logging on the dashboard HTTP server and forward logs to a centralized analytics or SIEM platform.
  • Monitor outbound egress from hosts running token-optimizer-mcp for exfiltration of session file contents.
  • Track version inventory of token-optimizer-mcp deployments to identify hosts still running versions prior to 5.1.0.

How to Mitigate CVE-2026-55156

Immediate Actions Required

  • Upgrade token-optimizer-mcp to version 5.1.0 or later on all hosts.
  • Restrict the dashboard HTTP server to localhost binding until the upgrade is verified.
  • Audit .jsonl files reachable from the server process for sensitive content, and rotate any credentials or tokens that may have appeared in session data.

Patch Information

The issue is fixed in token-optimizer-mcp v5.1.0. See the remediation commit at GitHub Commit b4ee96d and the coordinated advisory at GHSA-76pc-mqxp-3rq5.

Workarounds

  • Bind the dashboard HTTP server exclusively to the loopback interface using host firewall rules.
  • Place the dashboard behind a reverse proxy that enforces authentication and rejects sessionId values containing . or / characters.
  • Run the MCP server under a least-privilege account whose filesystem access is limited to the intended session directory.
bash
# Restrict dashboard access to localhost with iptables
iptables -A INPUT -p tcp --dport 3000 ! -s 127.0.0.1 -j DROP

# Upgrade to the patched release
npm install token-optimizer-mcp@5.1.0

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

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.