Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious PyPI packages give hackers control of Telegram bot servers

0
Low
Malwarepython
Published: 06/30/2026 (06/30/2026, 21:02:55 UTC)
Source: Bleeping Computer

Description

Since November 2025, a campaign has been distributing malicious forks of the Pyrogram Python library on PyPI targeting developers building Telegram bots. These trojanized packages contain a hidden backdoor that activates on infected bots, allowing attackers to execute arbitrary Python code or shell commands on compromised servers. The backdoor enables attackers to read arbitrary files, access Telegram chats, dump secrets, and install persistent backdoors. The malicious packages have been downloaded thousands of times, and the attacker controls infected bots via hardcoded Telegram IDs. Developers are advised to remove these packages, rotate credentials, and revoke Telegram bot tokens.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 06/30/2026, 21:21:41 UTC

Technical Analysis

A threat actor published at least eight malicious forks of the Pyrogram Python library on PyPI between November 2025 and June 2026. These packages include a hidden backdoor module (secret.py) that registers Telegram command handlers to execute attacker-supplied Python code or shell commands on infected servers running Telegram bots. The backdoor allows reading arbitrary files, accessing Telegram client data, and exfiltrating information via Telegram messages. The attacker uses a hardcoded list of Telegram IDs for exclusive control and disables logging to operate stealthily. The campaign targets production Telegram bot environments to access sensitive infrastructure components. Checkmarx researchers attribute all malicious packages to a single actor based on shared code and infrastructure.

Potential Impact

Attackers gain remote code execution on servers running infected Telegram bots, enabling them to read any file, access Telegram chats and session data, dump secrets, download databases, and install persistent backdoors. This compromises the confidentiality and integrity of the affected servers and any sensitive data they hold. The backdoor operates with the same privileges as the infected application, potentially allowing full system compromise depending on the bot's permissions.

Mitigation Recommendations

No official patch exists as this is a supply chain malware campaign involving malicious PyPI packages. Developers should immediately remove any of the identified malicious Pyrogram forks from their environments. They must rotate all credentials on affected servers and revoke Telegram bot tokens to prevent further unauthorized access. Vigilance in verifying package authenticity before installation is critical to avoid similar supply chain threats.

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

Technical Details

Article Source
{"url":"https://www.bleepingcomputer.com/news/security/malicious-pypi-packages-give-hackers-control-of-telegram-bot-servers/","fetched":true,"fetchedAt":"2026-06-30T21:21:27.805Z","wordCount":907}

Threat ID: 6a44335727e9c7971968eb2c

Added to database: 06/30/2026, 21:21:27 UTC

Last enriched: 06/30/2026, 21:21:41 UTC

Last updated: 07/01/2026, 03:33:44 UTC

Views: 7

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