Malicious Code Detected in cm-graphjs Package
Summary
MAL-2025-17211: Malicious code in cm-graphjs (npm). Affected versions are not published. 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 cm-graphjs package is an npm library designed for graph visualization and manipulation. It provides developers with tools to create interactive graphs and manage data relationships effectively. However, recent findings have revealed that this package contains malicious code, posing a significant security risk to applications that utilize it.
Vulnerability Detail
The cm-graphjs package has been identified to contain malicious code that can compromise the security of applications using it. This vulnerability originated from the package's codebase, which was likely altered to include harmful scripts. The ramifications of this vulnerability can include unauthorized access to sensitive data, data corruption, or even complete system takeover, depending on how the malicious code is executed within the application.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall cm-graphjs
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, you can remove the cm-graphjs package from your project until a secure version is released. You can do this by running: 'npm uninstall cm-graphjs'. Consider using alternative libraries for graph visualization that are known to be secure.
Conclusion
The discovery of malicious code in the cm-graphjs package highlights the importance of regularly monitoring and updating dependencies in software projects. By following the recommended steps to fix the vulnerability and utilizing tools like Vulert for real-time monitoring, developers can safeguard their applications against potential threats.
See every vulnerability recorded for cm-graphjs →
FAQ
cm-graphjs is an npm library used for creating and manipulating graphs in web applications.
The malicious code was likely introduced through unauthorized modifications to the package's codebase.
Using the compromised package can lead to unauthorized data access, data corruption, and potential system breaches.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If immediate updates are not possible, consider removing the package and using alternative libraries until a secure version is available.