# CVE-2026-52830: Path Traversal in fast-mcp-telegram Bearer Token Validation Exposes Telegram Session Files

> fast-mcp-telegram, a Python/PyPI Model Context Protocol (MCP) server that bridges Telegram accounts to AI assistants and HTTP clients, fails to sanitize HTTP Bearer tokens before joining them into a session-file path. An unauthenticated remote attacker can supply a traversal-crafted token such as `../fast-mcp-telegram/telegram` to bypass the server's reserved-token blocklist and authenticate as the default legacy Telegram session at `~/.config/fast-mcp-telegram/telegram.session`, gaining full MTProto API access (read/send messages, invoke all account-prefixed MCP tools). All versions up to 0.19.0 are affected; fixed in 0.19.1.

- **Published:** 2026-07-10T00:00:00Z
- **Last reviewed:** 2026-07-10T00:00:00Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-1190
- **Card image:** https://intel.threadlinqs.com/og/threat/threat-intel-fast-mcp-telegram-bearer-token-bypass-tl-2026-1190.webp?v=0c6ee7b4 (Threadlinqs threat intel: CVE-2026-52830 fast-mcp-telegram Bypass: Detection & IOCs (TL-2026-1190) — Critical severity, 16 IOCs, 9 detection rules.)
- **ID:** TL-2026-1190
- **Severity:** CRITICAL (CVSS 9.4)
- **Category:** VULNERABILITY
- **Status:** PATCHED
- **Detections:** 9 (1 shown free below) · **IOCs:** 16
- **CVEs:** CVE-2026-52830

## Description

fast-mcp-telegram exposes an HTTP-accessible MCP (Model Context Protocol) server that lets AI assistants and HTTP clients drive a Telegram account through MTProto. To support multiple concurrent Telegram sessions over HTTP, the server authenticates each request with a Bearer token and resolves that token to a session file on disk via `SessionFileTokenVerifier.verify_token()`, which constructs the path as `session_dir / f"{token}.session"`.

To stop HTTP clients from silently reusing the operator's own default account, the verifier explicitly denies tokens whose lowercase value matches a small reserved-name list, including the literal string `telegram` (the default session's base filename). However, the verifier never normalizes the token or rejects path separators, `..` segments, or absolute paths before performing this check and before joining the token into the filesystem path. Because the blocklist compares only the raw token string, an attacker can trivially route around it: a token such as `../fast-mcp-telegram/telegram` does not equal the literal string `telegram`, so the blocklist check passes, yet when joined and resolved on disk it points at the exact same file, `~/.config/fast-mcp-telegram/telegram.session` (the config/session directory is itself named `fast-mcp-telegram`, so a single `../` traversal segment plus the real filename recreates the original path).

Once the traversal-crafted Bearer token resolves to an existing session file, the verifier treats the request as successfully authenticated as that session's owner, entirely without any prior authentication, valid credential, or user interaction (CVSS 3.1 AV:N/AC:L/PR:N/UI:N). The attacker is now driving the default (typically privileged, first-configured) Telegram account through every MCP tool exposed by the server: reading and sending messages and attachments, enumerating chats/contacts, and issuing arbitrary MTProto API calls available to that session. This holds even in deployments that intentionally enable per-user, account-prefixed MCP tools specifically to prevent HTTP multi-tenant clients from ever touching the default account — the path-traversal bypass defeats that isolation control entirely, collapsing the server's authentication model down to unauthenticated full-account access. Confidentiality and integrity impact are both High; availability impact is Low (the flaw does not directly enable session/file destruction), yielding the published CVSS 3.1 base score of 9.4 (Critical), vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L.

The flaw is dual-classified CWE-22 (Improper Limitation of a Pathname to a Restricted Directory / Path Traversal) and CWE-287 (Improper Authentication), reflecting that the root defect is a path-normalization failure but the security consequence is a full authentication bypass. It was reported by researcher DavidCarliez, assigned GHSA-rxw2-pc8j-vxwm by the GitHub Advisory Database and CVE-2026-52830, and published July 2, 2026 (NVD last modified July 6, 2026), with broad security-press coverage (Cyber Security News, GBHackers, TheHackerWire, Cryptika, Rankiteo) starting July 7, 2026. It was fixed in fast-mcp-telegram 0.19.1 by enforcing a safe token alphabet, rejecting traversal/absolute-path characters, and verifying the resolved path stays within the configured session directory.

The vulnerability sits within a broader 2026 pattern of MCP ecosystem insecurity: independent research (VIPER-MCP scanning ~39,884 public MCP repositories; Censys internet scanning) found 106 zero-day-class MCP vulnerabilities, roughly 12,520 publicly exposed MCP services (~40% with no authentication at all), 43% of servers carrying command-injection-class flaws, and 79% handling credentials in plaintext, with over 30 CVEs filed against MCP servers between January and February 2026 alone. This CVE maps directly to two OWASP MCP Top 10 categories: MCP07 (Insufficient Authentication and Authorization) and, via its file-path handling root cause, the path-traversal-heavy execution-layer risks OWASP groups under MCP05 (Command Injection and Execution), where surveyed MCP servers showed an 82% path-traversal exposure rate.

No in-the-wild exploitation or attacker-controlled IOCs (C2 domains/IPs, malware) had been reported at time of writing; a proof-of-concept demonstrating the traversal bypass was confirmed by security researchers but not published with operational indicators.

## MITRE ATT&CK

- T1595 Active Scanning
- T1596 Search Open Technical Databases
- T1190 Exploit Public-Facing Application
- T1133 External Remote Services
- T1078 Valid Accounts
- T1059 Command and Scripting Interpreter
- T1098 Account Manipulation
- T1078 Valid Accounts
- T1211 Exploitation for Stealth
- T1036 Masquerading
- T1528 Steal Application Access Token
- T1552 Unsecured Credentials
- T1087 Account Discovery
- T1518 Software Discovery
- T1213 Data from Information Repositories
- T1005 Data from Local System
- T1071 Application Layer Protocol
- T1102 Web Service
- T1567 Exfiltration Over Web Service

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**CVE-2026-52830 — Reserved Session Filename Resolved from Non-Literal Bearer Token** (`TL-2026-1190-SPL-002`)

Detects successful MCP authentication events where the resolved session-file path matches the reserved default filename (telegram.session) even though the raw supplied Bearer token was not the literal string 'telegram' — the concrete post-exploitation signature of the blocklist bypass granting default-account access.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1528, T1078, T1552
- **Data sources:** fast-mcp-telegram application auth logs, sysmon file_event, windows_security
- **Severity:** critical
- **Confidence:** high

### Splunk SPL

```spl
index=app sourcetype="fast-mcp-telegram:auth"
| eval token_literal=if(match(bearer_token, "^telegram$"), "literal", "non_literal")
| where resolved_session_path="*telegram.session" AND token_literal="non_literal" AND auth_result="success"
| table _time, src_ip, bearer_token, resolved_session_path, auth_result, account_scope
| sort -_time
```

### Microsoft KQL

```kql
DeviceFileEvents
| where TimeGenerated > ago(24h)
| where FolderPath has "fast-mcp-telegram" and FileName == "telegram.session"
| join kind=inner (
    DeviceProcessEvents
    | where ProcessCommandLine has "Authorization" and ProcessCommandLine has "Bearer"
    | where not(ProcessCommandLine has "Bearer telegram")
) on DeviceName
| project TimeGenerated, DeviceName, FileName, InitiatingProcessAccountName, ProcessCommandLine
```

### Sigma

```yaml
title: MCP Server Reserved Session Filename Access via Non-Literal Token
id: 4d7c9a10-6b3e-4f21-9a8e-1c2d3e4f5190
status: experimental
description: Detects file access to a reserved default session filename (e.g. telegram.session) resolved from a non-literal/traversal-containing bearer token, indicating a reserved-token-blocklist bypass.
references:
    - https://github.com/advisories/GHSA-rxw2-pc8j-vxwm
author: Threadlinqs Team
date: 2026-07-10
tags:
    - attack.credential-access
    - attack.t1528
    - attack.t1078
    - attack.tool.fast_mcp_telegram
    - cve.2026.52830
logsource:
    category: file_event
    product: linux
detection:
    selection:
        TargetFilename|endswith: 'telegram.session'
        Image|contains: 'python'
    filter_literal:
        CommandLine|contains: 'token=telegram'
    condition: selection and not filter_literal
falsepositives:
    - Legitimate default-account owner authenticating with the literal 'telegram' token from an approved host
level: medium
```

**Known false positives:**

- Legitimate operator re-authenticating the default session with an unusual but non-malicious token format

**Tuning notes:** Enrich with the raw bearer_token field to confirm the resolved-vs-literal mismatch rather than relying on filename alone; baseline the known set of authorized session-owner source IPs/hosts to suppress expected traffic.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- MCP Endpoint Reconnaissance Preceding Bearer Token Traversal Exploit (locked: unlock with TL Creds)
- Bearer Token Alphabet Violation Reaching Authentication Success (locked: unlock with TL Creds)
- Default-Account Session Discovery via Account-Prefix Bypass (locked: unlock with TL Creds)
- Sigma — Traversal-Crafted Bearer Token in Reverse Proxy Access Log (locked: unlock with TL Creds)
- Sigma — Reserved Session File Access via Non-Literal Bearer Token (Valid Accounts / Steal Access Token) (locked: unlock with TL Creds)
- Sigma — MTProto C2/Exfiltration Burst on Default Account After Bypass Auth (locked: unlock with TL Creds)
- CVE-2026-52830 — Path Traversal Sequence in MCP Bearer Authorization Header (locked: unlock with TL Creds)
- CVE-2026-52830 — Anomalous MTProto Tool Invocation Following Traversal Bypass Auth (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sources

- [Critical fast-mcp-telegram Vulnerability Lets Attackers Access Telegram Session Without Token](https://cybersecuritynews.com/fast-mcp-telegram-vulnerability/)
- [CVE-2026-52830 Detail - NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-52830)
- [CVE-2026-52830: fast-mcp-telegram: Bearer token path traversal bypasses reserved Telegram session protection](https://advisories.gitlab.com/pypi/fast-mcp-telegram/CVE-2026-52830/)
- [GHSA-rxw2-pc8j-vxwm — fast-mcp-telegram GitHub Security Advisory](https://github.com/advisories/GHSA-rxw2-pc8j-vxwm)
- [Critical fast-mcp-telegram Vulnerability Lets Attackers Access Telegram Session Without Token](https://gbhackers.com/critical-fast-mcp-telegram-vulnerability/)
- [fast-mcp-telegram Critical Path Traversal Session Bypass (CVE-2026-52830)](https://www.thehackerwire.com/fast-mcp-telegram-critical-path-traversal-session-bypass-cve-2026-52830/)
- [Fast-mcp-telegram Vulnerability Allow Attackers to Access Sensitive Files](https://www.cryptika.com/fast-mcp-telegram-vulnerability-allow-attackers-to-access-sensitive-files/)
- [Critical fast-mcp-telegram Vulnerability Lets Attackers Access Telegram Session Without Token](https://blog.rankiteo.com/telgtp1783340994-fast-mcp-telegram-telegram-vulnerability-july-2026/)
- [fast-mcp-telegram vulnerabilities](https://www.kodemsecurity.com/cve-archive/package/fast-mcp-telegram)
- [OWASP MCP Top 10: A Guide to Securing Model Context Protocol in 2026](https://cycode.com/blog/owasp-mcp-top-10/)
- [Archived fast-mcp-telegram GitHub repository](https://web.archive.org/web/20250926152207/https://github.com/leshchenko1979/fast-mcp-telegram)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-1190
