Malicious Code Vulnerability in 'platforms' Package - Telegram Bot Activation
Summary
MAL-2026-901: Malicious code in platforms (PyPI). Affects platforms versions 1.0.0 – 6.0.0. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The 'platforms' package is a Python library available on PyPI that is intended for various platform-related functionalities. However, it has been found to contain malicious code that activates a Telegram bot upon import, which can download and save files locally. This behavior is not disclosed in the package documentation, raising significant security concerns for users who may unknowingly install it.
Vulnerability Detail
The vulnerability originates from the inclusion of malicious code in the 'platforms' package, specifically designed to initiate a Telegram bot that listens for specific messages in a channel. This bot can download and save files without user consent, posing a risk of data theft or unauthorized access to sensitive information. The malicious intent is further underscored by the use of typosquatting-like names for the involved packages, which can mislead users into installing them.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall platforms
If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, users can avoid importing the 'platforms' package until a secure version is released. Additionally, consider using virtual environments to isolate dependencies and minimize the risk of malicious code execution.
Conclusion
The 'platforms' package has been identified as containing malicious code that activates a Telegram bot, posing significant security risks. Users are advised to update or uninstall the package and monitor their systems for any unauthorized activities. Utilizing tools like Vulert can help in identifying and managing such vulnerabilities effectively.
See every vulnerability recorded for platforms →
FAQ
The 'platforms' package is a Python library designed for platform-related functionalities, but it has been compromised with malicious code.
The malicious code activates a Telegram bot that can download files locally based on specific messages, without user consent.
If you have installed the 'platforms' package, immediately uninstall it and check for any unauthorized files or data on your system.
You can use tools like Vulert, which monitors and alerts for open-source vulnerabilities in your software by analyzing the Pipfile.lock.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.