Skip to main content

token-optimizer-mcp CVE-2026-55156

MEDIUM
Path Traversal (CWE-22)
2026-08-14 https://github.com/ooples/token-optimizer-mcp GHSA-76pc-mqxp-3rq5
5.3
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
vuln.today AI
5.3 MEDIUM

Network-accessible unauthenticated endpoint; confidentiality limited to .jsonl files only; no integrity or availability impact applies.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

Lifecycle Timeline

2
Source Code Evidence Fetched
Aug 14, 2026 - 22:01 vuln.today
Analysis Generated
Aug 14, 2026 - 22:01 vuln.today

DescriptionGitHub Advisory

Unauthenticated Path Traversal in Dashboard Session Log API Endpoints

FieldValue
Repositoryooples/token-optimizer-mcp
Affected version5.0.1 (commit 8137147)
VulnerabilityCWE-22 - Improper Limitation of a Pathname to a Restricted Directory
SeverityMedium
CVSS 3.15.3 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N)

Summary

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 the intended hooksDataPath directory with a single unauthenticated HTTP GET request.

Affected Code

src/server/web-server.ts:73-88 - /api/session-summary: unsanitized sessionId interpolated into path.join then passed to fs.readFileSync

typescript
    const hooksDataPath = getHooksDataPath();
    const jsonlFilePath = path.join(
      hooksDataPath,
      `session-log-${sessionId}.jsonl`
    );

    if (!fs.existsSync(jsonlFilePath)) {
      return res.status(404).json({
        success: false,
        error: `JSONL log not found for session ${sessionId}`,
        sessionId,
      });
    }

    // Parse JSONL file
    const jsonlContent = fs.readFileSync(jsonlFilePath, 'utf-8');

src/server/web-server.ts:297-311 - /api/session-events: identical unsanitized path.join + fs.readFileSync pattern

typescript
    const hooksDataPath = getHooksDataPath();
    const jsonlFilePath = path.join(
      hooksDataPath,
      `session-log-${sessionId}.jsonl`
    );

    if (!fs.existsSync(jsonlFilePath)) {
      return res.status(404).json({
        success: false,
        error: `JSONL log not found for session ${sessionId}`,
      });
    }

    // Parse JSONL file
    const jsonlContent = fs.readFileSync(jsonlFilePath, 'utf-8');

req.query.sessionId flows unsanitized into path.join(hooksDataPath, \session-log-${sessionId}.jsonl\), which Node.js resolves by normalizing .. traversal sequences before the fs.readFileSync call.

Proof of Concept

Step 1 - Send traversal payload to /api/session-events with no credentials: server returns HTTP 200 with contents of a .jsonl file outside hooksDataPath - proves unauthenticated out-of-bounds file read.

bash
curl -s "http://127.0.0.1:3100/api/session-events?sessionId=abc%2F..%2F..%2F..%2F..%2Ftraversal-target"
http
GET /api/session-events?sessionId=abc%2F..%2F..%2F..%2F..%2Ftraversal-target HTTP/1.1
Host: 127.0.0.1:3100
User-Agent: python-requests/2.x
Accept: */*
http
HTTP/1.1 200 OK
X-Powered-By: Express
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=utf-8
Content-Length: 186

{"success":true,"sessionId":"abc/../../../../traversal-target","total":1,"offset":0,"limit":100,"events":[{"type":"PATH_TRAVERSAL_EVIDENCE","secret":"sensitive-data-outside-hooks-dir"}]}

Impact

An unauthenticated remote attacker can read the contents of any .jsonl file accessible to the process running the dashboard server. In a typical deployment this includes all session log files (which contain tool invocations, hook outputs, and token usage data) as well as any other .jsonl file reachable via .. traversal from hooksDataPath. The constraint that the resolved path must end in .jsonl limits the attack surface to that file extension, but session logs can contain sensitive operational data. The same path traversal is present in both /api/session-summary and /api/session-events, and neither endpoint requires authentication.

Remediation

  1. Validate sessionId format before use: reject any value that does not match a strict allowlist such as /^[a-zA-Z0-9_-]{1,64}$/. This prevents / and . characters from entering the path construction entirely.
typescript
   const SESSION_ID_RE = /^[a-zA-Z0-9_-]{1,64}$/;
   if (!SESSION_ID_RE.test(sessionId)) {
     return res.status(400).json({ success: false, error: 'Invalid sessionId' });
   }
  1. Alternatively, apply path.basename to strip all directory components: path.basename(sessionId) reduces any traversal sequence to a bare filename before path.join.
  2. Add authentication middleware to all /api/* routes so that even if a bypass is found the endpoints are not reachable without a valid session token.

AnalysisAI

Unauthenticated path traversal in the token-optimizer-mcp dashboard server (npm package @ooples/token-optimizer-mcp v5.0.1) allows any network-accessible attacker to read arbitrary .jsonl files from the server's filesystem by supplying a crafted sessionId parameter to /api/session-summary or /api/session-events. The CVSS vector (PR:N, AV:N, AC:L, UI:N) confirms zero authentication or user interaction is required, and a working proof-of-concept demonstrating successful out-of-bounds file exfiltration has been publicly disclosed in GHSA-76pc-mqxp-3rq5. …

Unlock full vulnerability intelligence

  • Risk assessment & exploitation conditions
  • Attack chain visualization
  • Remediation with exact patch versions
  • Threat intelligence from 22 sources
  • Personal watchlist & email alerts

Free forever · No credit card required

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata

Access
technique details hidden
Delivery
technique details hidden
Exploit
technique details hidden
Execution
technique details hidden
Persist
technique details hidden
Impact
technique details hidden

Vulnerability AssessmentAI

Exploitation The dashboard HTTP server must be running and reachable by the attacker over the network; instances bound to 0.0.0.0 or a public interface are directly exploitable, while localhost-only bindings limit the attack to local users. … Additional conditions and limiting factors are described in the full assessment.
Risk Assessment The CVSS 3.1 score of 5.3 (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N) accurately characterizes this as a low-complexity, unauthenticated network attack with bounded confidentiality impact - the .jsonl extension constraint prevents reading arbitrary system files such as private keys or /etc/shadow, which keeps the ceiling at C:L rather than C:H. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in.
Exploit Scenario Full exploit scenario with step-by-step reproduction available after sign-in.
Remediation Upgrade to @ooples/token-optimizer-mcp version 5.1.0 or later, available as a tagged release at https://github.com/ooples/token-optimizer-mcp/releases/tag/v5.1.0 and fixed by commit b4ee96dac799cbfba0a9f9c17844ce9d613cbcc7 (https://github.com/ooples/token-optimizer-mcp/commit/b4ee96dac799cbfba0a9f9c17844ce9d613cbcc7). … Detailed patch versions, workarounds, and compensating controls in full report.

Threat intelligence, references, and detailed analysis are available after sign-in.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

CVE-2026-55255 HIGH POC
8.4 Jun 19

Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing

Share

CVE-2026-55156 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy