Malicious Code Detected in Pathfiles Package - Data Exfiltration Risk
Summary
MAL-2026-696: Malicious code in pathfiles (PyPI). Affects pathfiles versions 1.0.1 – 1.1.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 'pathfiles' package, available on PyPI, is designed for file system manipulation. However, it has been found to contain obfuscated code that communicates with a Telegram channel, indicating potential malicious intent. The package is primarily used for data handling but has been compromised, posing a significant risk to users who may unknowingly install it.
Vulnerability Detail
The vulnerability originates from the 'pathfiles' package, which disguises itself as a legitimate library for file system manipulation. In reality, it contains obfuscated code intended for data exfiltration by communicating with a Telegram channel. This malicious behavior can lead to unauthorized data access and potential breaches of user privacy, making it a serious threat to any application that utilizes this package.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall pathfiles
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 using the 'pathfiles' package altogether and seek alternative libraries that provide similar functionality without the associated risks. Additionally, consider implementing strict package management practices to monitor and control dependencies.
Conclusion
The discovery of malicious code within the 'pathfiles' package highlights the importance of vigilance in managing open-source dependencies. Users are urged to take immediate action to protect their applications from potential data exfiltration risks. Utilizing tools like Vulert can aid in monitoring and identifying vulnerabilities in real-time.
See every vulnerability recorded for pathfiles →
FAQ
The 'pathfiles' package is a Python library intended for file system manipulation, but it has been compromised with malicious code.
You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to analyze your Pipfile.lock.
If you have installed 'pathfiles', you should uninstall it immediately and consider using alternative libraries for file system manipulation.
Currently, there is no patched version available. Users are advised to uninstall the package until further notice.
To prevent similar vulnerabilities, regularly audit your dependencies, use tools like Vulert for monitoring, and stay informed about security updates in the packages you use.