Malicious ‘Pyronut’ Package Backdoors Telegram Bots With Remote Code Execution
A Python package named pyronut was identified on the Python Package Index (PyPI) as a malicious entity, targeting developers creating Telegram bots by mimicking the legitimate pyrogram framework.
A Python package named pyronut was identified on the Python Package Index (PyPI) as a malicious entity, targeting developers creating Telegram bots by mimicking the legitimate pyrogram framework.
The pyronut package replicated the entire project description of pyrogram , thereby functioning as a malicious fork intended to deceive developers through social engineering. The original pyrogram framework receives approximately 370,000 downloads monthly, making it a lucrative target for impersonation.
The pyronut package did not introduce any new features and its GitHub repository URL was invalid. Distribution likely occurred through Telegram communities and developer forums. The package had three versions released—2.0.184, 2.0.185, and 2.0.186—all identified as malicious.
Researchers from Endor Labs detected all three versions on March 18, 2026, and quarantined them within hours, thus minimizing the potential impact on developers.
The package employed a runtime activation strategy, remaining dormant until the bot was executed by the developer. It included a hidden backdoor module in pyrogram/helpers/secret.py , which activated every time the Telegram client started, bypassing standard security checks.
The original pyrogram framework receives approximately 370,000 downloads monthly, making it a lucrative target for impersonation.
Successful exploitation allowed the attacker to execute arbitrary Python code and shell commands, enabling credential theft, data exfiltration, and full control over the active Telegram session.
Package Version Publication Date Status
pyronut 2.0.184 Mar 18, 2026 Quarantined
pyronut 2.0.185 Mar 18, 2026 Quarantined
pyronut 2.0.186 Mar 18, 2026 Quarantined
Developers who have installed pyronut should uninstall it immediately and rebuild their environments from a verified state. Exposed environment variables, API keys, SSH keys, and database passwords should be rotated. It is crucial to terminate active Telegram sessions and revoke all Bot API tokens.
Regularly reviewing dependency files for unexpected packages and using lockfiles with cryptographic hash pinning are recommended practices to prevent similar attacks. Adopting the principle of least privilege and integrating Software Composition Analysis tools into CI/CD pipelines can further reduce exposure to supply chain attacks.
Based on reporting by Cyber Security News.
