Skip to main content
EPSS 0.4%top 64%

CVE-2026-55156: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in ooples token-optimizer-mcp

0
Medium
Published: 09/28/2026 (09/28/2026, 17:48:21 UTC)
Source: GCVE Database
Vendor/Project: ooples
Product: token-optimizer-mcp

Description

Token Optimizer MCP measures token savings per AI coding agent, optimizes context, and shares a live local knowledge graph across 16 CLI clients. Prior to version 5.1.0, 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. This issue has been patched in version 5.1.0.

CVSS v3.1

Score 5.3medium

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Affected software

npmghsa
@ooples/token-optimizer-mcp
Affected versions
<5.1.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/29/2026, 01:58:42 UTC

Technical Analysis

The dashboard HTTP server in @ooples/token-optimizer-mcp (version 5.0.1) exposes two API endpoints that accept a sessionId parameter which is concatenated unsafely into a filesystem path using path.join. Node.js normalizes '..' sequences, enabling unauthenticated attackers to perform path traversal and read arbitrary .jsonl files outside the intended directory. Both /api/session-summary and /api/session-events endpoints are affected. The vulnerability is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory). Proof of concept demonstrates reading files outside the hooksDataPath directory without credentials. The vulnerability allows disclosure of potentially sensitive session log data.

Potential Impact

An unauthenticated remote attacker can read any .jsonl file accessible to the server process by exploiting path traversal via the sessionId parameter. This can expose sensitive operational data contained in session logs and other .jsonl files reachable from the hooksDataPath directory. The attack does not allow modification or deletion of files, only read access. The lack of authentication on these endpoints increases the risk of unauthorized data disclosure.

Mitigation Recommendations

A patch is available for this vulnerability. The vendor recommends validating the sessionId parameter against a strict allowlist regex to exclude path traversal characters, or alternatively using path.basename to sanitize the input before path joining. Additionally, authentication middleware should be added to all /api/* routes to prevent unauthenticated access. Applying these mitigations will prevent unauthorized file reads via path traversal.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-76pc-mqxp-3rq5
Osv Schema Version
1.4.0
Aliases
["CVE-2026-55156"]
Ecosystems
["npm"]
Database Specific Severity
MODERATE
Cvss Version
3.1

Threat ID: 6a7ff5ecbf8831d53987eb9c

Added to database: 08/15/2026, 05:15:24 UTC

Last enriched: 09/29/2026, 01:58:42 UTC

Last updated: 09/30/2026, 03:39:00 UTC

Views: 20

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses