Malicious Code Injection in python-requirements Package
Summary
MAL-2026-1264: Malicious code in python-requirements (PyPI). Affects python-requirements versions 3.15.5 – 3.15.6. 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 python-requirements package, available on PyPI, is intended for managing Python package dependencies. However, it has been compromised by a malicious actor who cloned the legitimate webdavclient3 library and modified it to serve as an installer utility. This altered package is designed to exfiltrate sensitive information and target cryptocurrency operations, posing significant risks to users.
Vulnerability Detail
The vulnerability originates from a malicious modification of the python-requirements package, which clones a legitimate library and injects harmful code. During installation, this code exfiltrates the current working directory to a remote WebDAV server or Telegram Bot. Additionally, it targets cryptocurrency operations, leading to potential data breaches and unauthorized access to sensitive configuration files during cryptocurrency exchanges.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall python-requirements
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 using the python-requirements package altogether and manually manage their Python dependencies. This can be done by creating a requirements.txt file and installing packages individually using 'pip install -r requirements.txt'.
Conclusion
The python-requirements package has been compromised, leading to significant security risks due to malicious code injection. Users are advised to uninstall the affected versions and monitor their applications for vulnerabilities using tools like Vulert. Staying informed and proactive is essential to maintaining software security.
See every vulnerability recorded for python-requirements →
FAQ
The python-requirements package is a tool for managing Python package dependencies, allowing developers to specify and install required libraries for their projects.
The malicious code can exfiltrate sensitive information from your working directory and potentially compromise your cryptocurrency operations, leading to data breaches.
Uninstall the affected versions of the python-requirements package immediately and consider using a secure alternative for managing dependencies.
You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software. Check your application against known vulnerabilities using the Vulert playground without any signup.
Detailed information about this vulnerability can be found on the GitHub repository of malicious packages or through security advisories related to the python-requirements package.