Malicious PyPI packages give hackers control of Telegram bot servers
A campaign active since November 2025 has distributed malicious PyPI packages—trojanized Pyrogram forks—targeting Python developers building Telegram bots. The compromised packages allow attackers to read arbitrary files on affected servers.
- Disclosed
- Last updated
- Blast radius
- Python developers building Telegram bots; servers running affected packages
- Ecosystems
- Attack vectors
- Affected entities
- Pyrogram (trojanized forks)Malicious PyPI packages impersonating or forking Pyrogram library
A supply chain attack campaign targeting Python developers has been active since at least November 2025, distributing malicious packages on PyPI that impersonate or fork the popular Pyrogram library used for building Telegram bots.
The trojanized packages are designed to compromise servers running Telegram bot applications. Once installed, they grant attackers the ability to read arbitrary files on the compromised systems, potentially exposing sensitive configuration, credentials, and application data.
The attack leverages the trust developers place in PyPI packages and the Pyrogram ecosystem. Developers building Telegram bots may inadvertently install malicious forks or similarly-named packages, leading to server compromise.
As of the publication date (June 30, 2026), the campaign remains active and ongoing.
Indicators of compromise
- Packages
- Pyrogram (trojanized forks - specific package names not disclosed in source)
Remediation
- Audit PyPI package dependencies for Pyrogram and verify package authenticity and source
- Review installed packages and remove any suspicious or unfamiliar Pyrogram forks
- Scan servers for indicators of compromise and unauthorized file access
- Implement package pinning and integrity verification in dependency management
- Monitor PyPI for malicious packages impersonating popular libraries
- Rotate credentials and review file access logs on affected servers
Sources
- Malicious PyPI packages give hackers control of Telegram bot servers · BleepingComputer
Cite this entry
"Malicious PyPI packages give hackers control of Telegram bot servers." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed June 30, 2026; last updated June 30, 2026. https://supplychainattack.org/incident/malicious-pypi-packages-give-hackers-control-of-telegram-bot-servers-1m8yux
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malicious code in @years19/n8n-nodes-utils-helper-d (npm)
The npm package @years19/n8n-nodes-utils-helper-d contained malicious code that downloads and executes a Python DDoS/offensive-tooling dropper on installation. The package impersonates a legitimate n8n community node but performs unauthorized system reconnaissance and beacons host identity to an attacker-controlled endpoint.
npmPyPICompromised packageTyposquatting - containedcritical
Malicious code in speed-hashes (PyPI)
Multiple malicious variants of the speed-hashes package were published to PyPI, containing obfuscated code that executes during installation. The malware downloads and executes remote binaries, exfiltrates cryptocurrency wallet data and other sensitive information, and achieves remote code execution on the installer's host.
2026 08 FlasqPyPICompromised packageTyposquatting - resolvedcritical
Malicious code in cdktn-provider-azurerm (PyPI)
A malicious package named cdktn-provider-azurerm was published to PyPI, using typosquatting to mimic HashiCorp's legitimate cdktf-provider-azurerm. The package forces installation of an attacker-controlled base dependency (cdktn) that executes arbitrary code upon import.
PyPITyposquattingCompromised package - containedcritical
Malicious code in pydanticc (PyPI)
The PyPI package pydanticc is a typosquatting attack imitating the popular pydantic library. During installation, it executes obfuscated code that downloads and runs a malicious executable, exfiltrating cryptocurrency wallet data and potentially other sensitive information.
2026 08 FlasqPyPITyposquattingCompromised package