🇰🇷 한글 설명
fast-mcp-telegram은 Telegram MCP 서버입니다. 0.19.1 이전 버전에서는 HTTP Bearer 토큰을 세션 파일 경로에 그대로 결합하며, 경로 구분자를 거부하거나 경로를 정규화하지 않습니다. 이로 인해 원격 공격자가 '../fast-mcp-telegram/telegram' 같은 토큰으로 기본 레거시 세션에 인증할 수 있습니다.
💡 쉬운 설명
이 프로그램은 인증 토큰을 파일 경로처럼 처리하는데, 특정 조작된 토큰을 보내면 기본 텔레그램 계정 세션에 접근할 수 있습니다. 공격자는 원격에서 이 계정의 도구를 사용할 수 있습니다.
🇺🇸 원문 (English)
fast-mcp-telegram is a Telegram MCP Server. Prior to 0.19.1, fast-mcp-telegram validates HTTP Bearer tokens by joining the raw token string into a session-file path. The verifier rejects the exact reserved token telegram, but it does not reject path separators or normalize the path before checking whether the session file exists. A remote HTTP client can therefore authenticate as the default legacy session with a token such as ../fast-mcp-telegram/telegram when the documented default session file ~/.config/fast-mcp-telegram/telegram.session exists. This bypasses the reserved session name control that is intended to prevent HTTP multi-user sessions from colliding with the default stdio or legacy account. With account-prefixed MCP tools enabled, the attacker still sees and calls the prefixed tools for the default account, so the prefix middleware does not stop the session selection bypass. This vulnerability is fixed in 0.19.1.
📍 영향받는 시스템
fast-mcp-telegram 0.19.1 미만 버전 (HTTP 모드 사용 시)
⚔️ 공격 벡터
원격 HTTP 요청의 Bearer 토큰에 '../fast-mcp-telegram/telegram'과 같은 경로 탐색 문자열을 넣어 기본 세션 파일로 인증 우회
🛡️ 대응 방법
fast-mcp-telegram을 0.19.1 이상으로 업그레이드하고, 필요 시 HTTP 모드를 비활성화하거나 네트워크 접근을 제한
🔧 검증 코드
출력된 버전이 0.19.1 미만이면 취약하며, 0.19.1 이상이면 패치가 적용된 것입니다. 명령 결과가 없으면 설치되지 않은 것입니다.
pip show fast-mcp-telegram 2>/dev/null | grep -i version || npm ls fast-mcp-telegram 2>/dev/null | grep fast-mcp-telegram