Skip to main content

token-optimizer-mcp EUVDEUVD-2026-88398

| 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 · Vendor: https://github.com/ooples/token-optimizer-mcp
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify network-accessible dashboard on port 3100
  2. Delivery
    Craft URL-encoded path traversal as sessionId value
  3. Exploit
    Send unauthenticated GET to /api/session-events or /api/session-summary
  4. Execution
    Node.js path.join normalizes .. sequences
  5. Persist
    Server reads .jsonl file outside hooksDataPath
  6. Impact
    Sensitive session data returned in HTTP 200 response

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

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. No authentication is required (CVSS PR:N), no user interaction is needed (UI:N), and no special server configuration beyond having the dashboard feature enabled is prerequisite. Exploitation is bounded to files with a .jsonl extension because the server hardcodes session-log-<sessionId>.jsonl in the path template - reads of arbitrary extensions (e.g., .env, .key, /etc/passwd) are not possible. Both /api/session-summary and /api/session-events are independently exploitable via the same technique.

Impact

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. No EPSS data was provided in the input, and the CVE does not appear in CISA KEV, so widespread active exploitation is unconfirmed; however, the public availability of a working single-request PoC in the GitHub advisory materially elevates real-world exploitation probability beyond what the raw CVSS score conveys. The attack is fully automatable - one unauthenticated GET request with no prerequisites - which means internet-exposed instances should be treated as critically urgent regardless of the Medium severity rating. Deployments where the dashboard is bound only to localhost face substantially lower risk, as exploitation requires local access. Session log files in MCP deployments may contain sensitive operational data including tool invocations, hook outputs, and token usage records, so the business impact of a successful read could exceed what C:L implies in high-sensitivity environments.

Exploit ScenarioDerived

A publicly available proof-of-concept confirms that an unauthenticated attacker sends a single HTTP GET request - curl -s 'http://<target>:3100/api/session-events?sessionId=abc%2F..%2F..%2F..%2F..%2Ftarget' - with no credentials or prior access. Node.js normalizes the URL-encoded ../.. sequences during path.join resolution, causing fs.readFileSync to return the contents of a .jsonl file outside the intended hooksDataPath, which the server then serializes into the JSON response body with HTTP 200.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 14, 2026

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. No active exploitation has been confirmed by CISA KEV, but the trivial exploitation complexity and public PoC make this an immediate priority for any internet-exposed deployment.

RemediationAI

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). If immediate upgrade is not feasible, restrict network access to the dashboard server (default port 3100) via firewall rules or by binding it exclusively to 127.0.0.1, which eliminates remote exploitation at the cost of preventing legitimate remote dashboard access. As an additional code-level control pending upgrade, validate sessionId against the strict regex /^[a-zA-Z0-9_-]{1,64}$/ before path construction, or apply path.basename(sessionId) to strip all directory components - both approaches are documented in the advisory. Adding authentication middleware to all /api/* routes provides defense-in-depth but does not substitute for the path sanitization fix.

Affected VersionsENISA

token-optimizer-mcp < 5.1.0

Affected Packages

npm @ooples/token-optimizer-mcp fix: 5.1.0
euvd token_optimizer_mcp fix: 5.1.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected package is an MCP (Model Context Protocol) server tool distributed via npm as @ooples/token-optimizer-mcp. Its bundled Express.js dashboard HTTP server exposes two API endpoints - /api/session-summary (web-server.ts:73-88) and /api/session-events (web-server.ts:297-311) - neither of which has authentication middleware. In both handlers, the req.query.sessionId value is interpolated directly into a Node.js path.join() call: path.join(hooksDataPath, session-log-${sessionId}.jsonl). Node.js's path resolution normalizes .. sequences at call time, so a sessionId value of abc/../../../../target escapes the intended hooksDataPath directory. CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) describes this root cause: the application does not canonicalize or allowlist the user-controlled path segment before filesystem access. The attack surface is partially bounded by the .jsonl suffix hardcoded into the path template, restricting reads to files bearing that extension.

Know when Node.js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/ooples/token-optimizer-mcp) 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 Vendor (https://github.com/ooples/token-optimizer-mcp).

CVSS VectorVendor: https://github.com/ooples/token-optimizer-mcp

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

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.4%
Top 64% exploitable
Prevalence
Low
niche MCP developer tooling, limited production enterprise footprint
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

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-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2013-4660 MEDIUM POC
6.8 Jun 28

The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, whic

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