Malicious Code Exfiltration in medifile Package
Summary
MAL-2026-352: Malicious code in medifile (PyPI). Affects medifile versions 2.1. 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 medifile package, available on PyPI, is designed for handling medical file operations. However, it has been identified to contain malicious code that compromises user data. This vulnerability allows the package to exfiltrate sensitive information such as the host's IP address and username, posing a significant risk to users who install it.
Vulnerability Detail
The vulnerability originates from the package's design, which includes code that executes during installation. Specifically, it overrides the install command in setup.py to run malicious code that collects and sends basic information about the host system. This behavior is indicative of a malicious intent, as the package serves no legitimate purpose beyond data exfiltration. The risk is categorized as low, but it still poses a threat to user privacy and security.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall medifile
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 measure, users can avoid installing the medifile package altogether. If the package is already installed, it is advisable to monitor system behavior and remove it immediately.
Conclusion
The medifile package has been identified as containing malicious code that exfiltrates sensitive information from users' systems. It is crucial for users to uninstall the package and remain vigilant about the packages they install in the future. Utilizing tools like Vulert can help in monitoring for such vulnerabilities.
See every vulnerability recorded for medifile →
FAQ
medifile is a Python package intended for managing medical file operations, but it has been compromised with malicious code.
The vulnerability allows the package to exfiltrate sensitive information such as your IP address and username, potentially compromising your privacy.
You should uninstall the medifile package immediately and check for any updates or patches that address this vulnerability.
Yes, you can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without needing to sign up.
Always review package details and user feedback before installation, and consider using tools like Vulert to monitor for vulnerabilities in your dependencies.