Malicious Code Exfiltration in pytorch-mutex Package
Summary
MAL-2026-590: Malicious code in pytorch-mutex (PyPI). Affects pytorch-mutex versions 0.0.0 – 7.0.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 pytorch-mutex package is a Python library available on the PyPI repository, typically used in conjunction with PyTorch for managing mutex locks in concurrent programming. However, this package has been identified as malicious, containing code that exfiltrates sensitive information from the host system, such as IP addresses and usernames, with no legitimate functionality.
Vulnerability Detail
The vulnerability originates from the package's design, which overrides the install command in setup.py to execute malicious code during installation. This code is responsible for exfiltrating basic data from the system, posing a risk to user privacy and security. The package has been flagged as part of a broader campaign targeting users through seemingly benign packages that actually serve malicious purposes.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall pytorch-mutex
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
Currently, there are no specific workarounds to mitigate the effects of this vulnerability other than uninstalling the package. Users should avoid using the pytorch-mutex package until a secure alternative is found.
Conclusion
The pytorch-mutex package has been identified as malicious, capable of exfiltrating sensitive information from users' systems. It is crucial for users to uninstall this package and seek safer alternatives to protect their privacy and security.
See every vulnerability recorded for pytorch-mutex →
FAQ
pytorch-mutex is a Python package intended for managing mutex locks in concurrent programming with PyTorch, but it has been identified as malicious.
The vulnerability allows the package to exfiltrate sensitive information such as your IP address and username, compromising your privacy.
You should uninstall the pytorch-mutex package immediately using the command: pip uninstall pytorch-mutex.
Users are encouraged to look for alternative packages that provide similar functionality without the associated security risks.
You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software. You can check your application for vulnerabilities using the Vulert playground at Vulert Scanner without any signup.