Malicious Code Exfiltration in ultrafasttelethon Package
Summary
MAL-2025-191915: Malicious code in ultrafasttelethon (PyPI). Affected versions are not published. 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 ultrafasttelethon package is a clone of the popular Telethon library, designed for interacting with the Telegram API. It is intended to facilitate the development of Telegram bots and applications by providing a simple interface for API calls. However, this package has been identified to contain malicious code that exfiltrates user credentials, posing a significant security risk to its users.
Vulnerability Detail
The vulnerability originates from the malicious intent of the package's creator, who has embedded code that exfiltrates sensitive user credentials. Specifically, the exfiltration function can be found in client/telegrambaseclient.py between lines 608-626, while its usage is present in client/auth.py at line 163. This malicious behavior allows unauthorized access to user data, which can lead to identity theft and unauthorized account access.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall ultrafasttelethon
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 should avoid using the ultrafasttelethon package altogether and refrain from executing any code that relies on it until it has been fully removed from their environment.
Conclusion
The ultrafasttelethon package has been identified as containing malicious code that exfiltrates user credentials, posing a significant security risk. Users are advised to uninstall this package and switch to the legitimate Telethon package to protect their sensitive information.
See every vulnerability recorded for ultrafasttelethon →
FAQ
ultrafasttelethon is a Python package that serves as a clone of the Telethon library, intended for interacting with the Telegram API.
The malicious code exfiltrates user credentials, which can lead to unauthorized access to user accounts and potential identity theft.
You should uninstall the ultrafasttelethon package immediately and switch to the legitimate Telethon package.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected without needing to sign up.
No, there is no patch available for ultrafasttelethon as it is a malicious package. The best course of action is to uninstall it and use the legitimate Telethon package.