Critical Malicious Code Vulnerability in requests-toolkit Package
Summary
MAL-2026-903: Malicious code in requests-toolkit (PyPI). Affects requests-toolkit versions 0.1.2 – 0.1.3. 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 requests-toolkit package is a Python library available on PyPI that is designed to facilitate HTTP requests and enhance the functionality of the requests library. It is commonly used in various applications for making web requests more manageable. However, this package has been compromised, leading to significant security concerns due to the presence of malicious code.
Vulnerability Detail
The vulnerability originates from a malicious actor who has embedded harmful code within the requests-toolkit package. Upon import, the package masquerades as a legitimate library and executes an embedded executable that exhibits infostealer behavior. This executable is capable of stealing sensitive information, including keystrokes, and has mechanisms to detect if it is running in a sandbox environment, making it particularly dangerous for users.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall requests-toolkit
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 requests-toolkit package until a patched version is released. Additionally, consider using alternative libraries for making HTTP requests, such as the standard requests library or other well-maintained packages.
Conclusion
The requests-toolkit package has been compromised with malicious code that poses a significant threat to users. It is crucial to uninstall the affected versions and seek alternatives to safeguard sensitive information. Regular monitoring for vulnerabilities using tools like Vulert can help maintain application security.
See every vulnerability recorded for requests-toolkit →
FAQ
The affected versions are 0.1.2 and 0.1.3.
You should uninstall the requests-toolkit package immediately and replace it with a safe alternative.
You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without any signup.
Signs of infostealer activity may include unexpected behavior in applications, unauthorized access to sensitive information, or detection of keylogging activities.
Currently, there is no patched version available for the requests-toolkit package. Users are advised to uninstall it and use alternative libraries.