Malicious Code Execution in requests-auth-toolkit Package
Summary
MAL-2026-847: Malicious code in requests-auth-toolkit (PyPI). Affects requests-auth-toolkit versions 2.1.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 requests-auth-toolkit is a Python package available on PyPI, designed to facilitate authentication processes in web applications. It provides developers with tools to manage authentication tokens and sessions efficiently. However, this package has been compromised, introducing a severe vulnerability that allows malicious actors to execute arbitrary commands on the victim's machine.
Vulnerability Detail
The vulnerability originates from a malicious script embedded within the requests-auth-toolkit package. During installation, this script listens for remote commands and executes them, posing a significant security risk. The malicious code also modifies the system's autostart configuration, ensuring persistence across reboots. Additionally, it generates new SSH keys, allowing continued access to the compromised system. The package overrides the install command in setup.py, executing harmful code during the installation process. This vulnerability can lead to unauthorized access, data theft, and further exploitation of the affected systems.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall requests-auth-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, avoid using the requests-auth-toolkit package until a secure version is released. If you must use it, consider isolating your environment using virtual environments or containers to minimize the risk of exposure.
Conclusion
The requests-auth-toolkit package has been compromised, introducing a serious vulnerability that allows for remote command execution. It is essential to uninstall the affected package and monitor your systems for any signs of compromise. Utilizing tools like Vulert can help in identifying and mitigating such vulnerabilities in the future.
See every vulnerability recorded for requests-auth-toolkit →
FAQ
It is a Python package designed to assist developers with authentication processes in web applications.
The vulnerability allows attackers to execute arbitrary commands on your machine, potentially leading to data theft and unauthorized access.
Uninstall the package immediately and check your system for any malicious scripts or configurations.
Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time using your Pipfile.lock.
Yes, you can use the Vulert playground at Vulert Scanner to check for vulnerabilities in your application without any signup.