{"id":"MAL-2026-13757","title":"Malicious code in telebot-pro (PyPI)","summary":"Malicious code in telebot-pro (PyPI)","severity":"none","vendor":"telebot-pro","product":"telebot-pro","ecosystem":"pip","affected":["telebot-pro"],"published":"2026-08-11","updated":"2026-08-12","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/MAL-2026-13757","references":[{"url":"https://bad-packages.kam193.eu/pypi/package/telebot-pro"},{"url":"https://pypi.org/project/telebot-pro/2.3.7/"},{"url":"https://pypi.org/project/telebot-pro/2.3.8/"}],"tags":["osv","pip"],"ingestedAt":"2026-08-12T19:18:07.598Z","slug":"MAL-2026-13757","body":"## Overview\n\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (b0e8fd9df00738115f53aef8944ede8d1f3d2daf360c2d227b54204ee62e8f89)\nOn instantiation of TeleBot(), the package spawns a background thread that copies the Telegram Desktop tdata directory from %APPDATA%\\Telegram Desktop\\tdata and decrypts the local key via win32crypt.CryptUnprotectData, base64-encoding the result. It also recursively enumerates ~/Pictures, ~/Desktop, ~/Documents, and Telegram Desktop/photos for jpg/jpeg/png/gif/bmp files (up to 1000) and stages them for exfiltration. Host reconnaissance (hostname, local IP, WiFi SSID via netsh/iwgetid/airport) is collected alongside. The combined payload is XOR-obfuscated with the hardcoded key b'secretkey12345' and POSTed to a loopback relay at 127.0.0.1:48765/submit, which forwards to https://api.telegram.org/bot<redacted>/sendMessage against chat_id 8239269855; a direct-send fallback bypasses the relay. The tarball also starts an HTTPServer on 127.0.0.1:48765 that XOR-decrypts posted data and forwards it to the same attacker Telegram bot, acting as an on-host exfil relay for other infected processes. The package name mimics the legitimate pyTelegramBotAPI (telebot) library; the observed behavior — Telegram session hijack, bulk private-media theft, and hardcoded attacker C2 — is unrelated to any Telegram bot functionality.\n\n## Source: kam193 (610b15fa9ed3d59133ac59b1104d43337faddd2ee77eaf21fd238bea6ac4f540)\nWhen using the provided bot class, the code starts a hidden exfiltration thread that collects Telegram session files, pictures and information about the machine, like connected WiFi networks.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-08-telebot-pro\n\n\nReasons (based on the campaign):\n\n\n - uses-telegram-bot\n\n\n - action-hidden-in-lib-usage\n\n\n - files-exfiltration\n\n\n - target:telegram\n\n\n## Affected packages\n\n- `telebot-pro`\n\n## Remediation\n\nRefer to the advisory for the patched release.","depth":"sunlit","depthScore":3,"depthScoreParts":{"impact":2.8,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}