Critical Malicious Code Vulnerability in graphex Package
Summary
MAL-2025-6517: Malicious code in graphex (PyPI). Affects graphex versions 3.5.10 – 3.5.9. 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 graphex package is a Python library designed for graph manipulation and analysis, offering users a range of functionalities to create, modify, and visualize graphs. It is widely used in data science and machine learning applications. However, recent findings have revealed that certain versions of graphex contain malicious code, posing significant security risks to users and their applications.
Vulnerability Detail
The vulnerability identified in the graphex package is classified as malicious code injection. This issue originated from compromised versions of the package (3.5.7, 3.5.8, 3.5.9, and 3.5.10), which were found to contain harmful code that could execute unauthorized actions on the user's system. The ramifications of this vulnerability include potential data breaches, unauthorized access to sensitive information, and the possibility of the affected systems being used for malicious purposes. Users are strongly advised to take immediate action to mitigate these risks.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall graphex
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
If immediate updating is not feasible, users can temporarily avoid using the affected versions of graphex (3.5.7, 3.5.8, 3.5.9, and 3.5.10) and revert to an earlier, unaffected version of the package. This can be done using the command: 'pip install graphex==<version>', replacing <version> with a known safe version number.
Conclusion
The graphex package has been found to contain malicious code in specific versions, posing serious security risks to users. It is crucial to update to the latest version to mitigate these risks. Users are encouraged to utilize tools like Vulert for ongoing monitoring of vulnerabilities in their applications.
See every vulnerability recorded for graphex →
FAQ
The affected versions of graphex are 3.5.7, 3.5.8, 3.5.9, and 3.5.10.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
As a temporary measure, you can revert to an earlier version of graphex that is not affected by the vulnerability.
Failure to address this vulnerability could lead to data breaches, unauthorized access to sensitive information, and exploitation of your system for malicious activities.
The vulnerability was discovered by ReversingLabs, a cybersecurity firm specializing in threat detection and analysis.