Malicious code in tencentcloud-python-sdk (PyPI)
Summary
MAL-2023-8371: Malicious code in tencentcloud-python-sdk (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 tencentcloud-python-sdk is a Python package available on PyPI that provides a client library for interacting with Tencent Cloud services. It is commonly used by developers to integrate Tencent Cloud functionality into their Python applications. However, this package has been found to contain malicious code that specifically targets users of Alibaba, AWS, and Telegram. The malicious code is hidden within certain functions and only triggers when these functions are called, making it difficult to detect. The code does not automatically run on installation or import, further evading detection.
Vulnerability Detail
The malicious code in tencentcloud-python-sdk poses a significant security risk to users who install and use this package. The code is designed to target users of Alibaba, AWS, and Telegram, potentially compromising their sensitive data or systems. The code was strategically placed within specific functions, making it difficult to detect through automated scanning or analysis. The exact nature and impact of the malicious code may vary, but it is essential for users to take immediate action to mitigate the risk.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall tencentcloud-python-sdk
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
There is no known workaround for this vulnerability. The best course of action is to remove the tencentcloud-python-sdk package and follow the recommended steps to mitigate the risk.
Conclusion
The presence of malicious code in the tencentcloud-python-sdk package poses a significant security risk to users of Alibaba, AWS, and Telegram. It is crucial for users to take immediate action by removing the package and securing their systems. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tencentcloud-python-sdk →
FAQ
tencentcloud-python-sdk is a Python package that provides a client library for interacting with Tencent Cloud services. It allows developers to integrate Tencent Cloud functionality into their Python applications.
The malicious code is hidden within certain functions of the package and only triggers when these functions are called. It specifically targets users of Alibaba, AWS, and Telegram, potentially compromising their data or systems.
You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities without requiring access to the code or installation.
If your application is affected by this vulnerability, you should immediately remove the tencentcloud-python-sdk package from your Python environment. You should also scan your systems for any signs of compromise and take appropriate action to secure your data and systems.
To prevent similar incidents in the future, it is important to regularly update your security measures, including keeping your software and packages up to date. Additionally, consider implementing additional safeguards such as code reviews, vulnerability scanning, and intrusion detection systems.