Critical Malicious Code Vulnerability in node-calculator-x7k9-evil Package
Summary
MAL-2025-192846: Malicious code in node-calculator-x7k9-evil (npm). Affects node-calculator-x7k9-evil versions 9999.9.9999. 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 node-calculator-x7k9-evil package is an npm library designed for performing basic arithmetic calculations. It is intended for developers looking to integrate simple calculator functionalities into their applications. However, this package has been identified as containing malicious code, which poses significant security risks to any application that utilizes it.
Vulnerability Detail
This vulnerability originates from the inclusion of malicious code within the node-calculator-x7k9-evil package. The malicious code can potentially execute harmful operations on the host system, leading to data breaches, unauthorized access, or system compromise. The affected version is 9999.9.9999, and it is crucial for users to be aware of the risks associated with using this package in their projects.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall node-calculator-x7k9-evil
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 avoid using the node-calculator-x7k9-evil package and implement your own basic calculator functions in JavaScript. Here is a simple example:
function add(a, b) {
return a + b;
}
function subtract(a, b) {
return a - b;
}
function multiply(a, b) {
return a * b;
}
function divide(a, b) {
if (b === 0) throw new Error('Cannot divide by zero');
return a / b;
}
Conclusion
The node-calculator-x7k9-evil package poses a significant security risk due to the presence of malicious code. It is crucial for developers to remove this package from their projects and consider safer alternatives. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for node-calculator-x7k9-evil →
FAQ
It is an npm library designed for basic arithmetic calculations but has been found to contain malicious code.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Check your application using the Vulert playground at Vulert Scanner.
You should uninstall the package immediately using the command npm uninstall node-calculator-x7k9-evil.
Yes, consider implementing your own calculator functions or searching for other reputable npm packages that provide similar functionalities.
Using malicious packages can lead to data breaches, unauthorized access to sensitive information, and potential system compromise.