Malicious code in telebot-pro (PyPI)
The telebot-pro package on PyPI is a malicious library that, when instantiated, spawns a background thread to steal Telegram Desktop session data, decrypts local keys, and collects private media files from user directories. It also gathers host information such as hostname, local IP, and WiFi SSID. The stolen data is XOR-obfuscated and exfiltrated via a local HTTP relay to an attacker-controlled Telegram bot. The package name mimics a legitimate Telegram bot API library but performs unauthorized data theft unrelated to Telegram bot functionality.
AI Analysis
Technical Summary
The telebot-pro PyPI package contains malicious code that activates upon creating a TeleBot() instance. It copies the Telegram Desktop 'tdata' directory from the user's %APPDATA% path, decrypts the local key using Windows CryptUnprotectData, and base64-encodes it. It recursively enumerates up to 1000 image files (jpg, jpeg, png, gif, bmp) from user directories including Pictures, Desktop, Documents, and Telegram Desktop photos. Host reconnaissance data such as hostname, local IP, and WiFi SSID is also collected. The combined data payload is XOR-obfuscated with a hardcoded key and sent via POST requests to a local HTTP server on 127.0.0.1:48765, which relays it to an attacker Telegram bot via the Telegram API. The local HTTP server acts as an exfiltration relay for other infected processes. This behavior constitutes Telegram session hijacking, bulk private media theft, and unauthorized data exfiltration. The package name is deceptive, imitating the legitimate pyTelegramBotAPI library, but its functionality is malicious and unrelated to Telegram bot operations.
Potential Impact
This malicious package compromises user privacy and security by stealing Telegram Desktop session files, enabling potential session hijacking. It also exfiltrates large volumes of private media files and collects sensitive host information including WiFi network details. The attacker gains unauthorized access to private communications and personal data, which can lead to further compromise or identity theft.
Mitigation Recommendations
No official patch or remediation is indicated for this malicious package. Users should immediately uninstall telebot-pro versions 2.3.7 and 2.3.8 if present. Avoid installing packages from untrusted sources or with suspicious names mimicking legitimate libraries. Verify package authenticity before use. Monitor for unauthorized local HTTP servers and unusual network activity related to 127.0.0.1:48765. Consider scanning systems for presence of this package and related artifacts and remove them promptly.
Malicious code in telebot-pro (PyPI)
Description
The telebot-pro package on PyPI is a malicious library that, when instantiated, spawns a background thread to steal Telegram Desktop session data, decrypts local keys, and collects private media files from user directories. It also gathers host information such as hostname, local IP, and WiFi SSID. The stolen data is XOR-obfuscated and exfiltrated via a local HTTP relay to an attacker-controlled Telegram bot. The package name mimics a legitimate Telegram bot API library but performs unauthorized data theft unrelated to Telegram bot functionality.
Affected software
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
Technical Analysis
The telebot-pro PyPI package contains malicious code that activates upon creating a TeleBot() instance. It copies the Telegram Desktop 'tdata' directory from the user's %APPDATA% path, decrypts the local key using Windows CryptUnprotectData, and base64-encodes it. It recursively enumerates up to 1000 image files (jpg, jpeg, png, gif, bmp) from user directories including Pictures, Desktop, Documents, and Telegram Desktop photos. Host reconnaissance data such as hostname, local IP, and WiFi SSID is also collected. The combined data payload is XOR-obfuscated with a hardcoded key and sent via POST requests to a local HTTP server on 127.0.0.1:48765, which relays it to an attacker Telegram bot via the Telegram API. The local HTTP server acts as an exfiltration relay for other infected processes. This behavior constitutes Telegram session hijacking, bulk private media theft, and unauthorized data exfiltration. The package name is deceptive, imitating the legitimate pyTelegramBotAPI library, but its functionality is malicious and unrelated to Telegram bot operations.
Potential Impact
This malicious package compromises user privacy and security by stealing Telegram Desktop session files, enabling potential session hijacking. It also exfiltrates large volumes of private media files and collects sensitive host information including WiFi network details. The attacker gains unauthorized access to private communications and personal data, which can lead to further compromise or identity theft.
Mitigation Recommendations
No official patch or remediation is indicated for this malicious package. Users should immediately uninstall telebot-pro versions 2.3.7 and 2.3.8 if present. Avoid installing packages from untrusted sources or with suspicious names mimicking legitimate libraries. Verify package authenticity before use. Monitor for unauthorized local HTTP servers and unusual network activity related to 127.0.0.1:48765. Consider scanning systems for presence of this package and related artifacts and remove them promptly.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13757
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["PyPI"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a7c9b4abf8831d539cdd617
Added to database: 08/12/2026, 16:11:54 UTC
Last enriched: 08/12/2026, 16:58:02 UTC
Last updated: 08/12/2026, 22:02:57 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.