Malicious Code Detected in node-calculator-b0e4: A Security Threat
Summary
MAL-2025-190569: Malicious code in node-calculator-b0e4 (npm). Affects node-calculator-b0e4 versions 2.1.3. 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
node-calculator-b0e4 is an npm package designed for performing basic arithmetic calculations. It is intended to provide users with a simple interface for mathematical operations. However, the package has been flagged for malicious behavior, raising concerns about its security and the potential risks it poses to users and their applications.
Vulnerability Detail
The vulnerability in node-calculator-b0e4 arises from its communication with a domain linked to malicious activities. This behavior indicates that the package may be executing commands that can compromise the security of the host system. Users of this package could face data breaches, unauthorized access, or other malicious actions as a result of this vulnerability.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall node-calculator-b0e4
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, users can avoid using the node-calculator-b0e4 package and instead implement basic arithmetic functions directly in their code. For example, you can create a simple calculator function as follows:
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 discovery of malicious code in node-calculator-b0e4 highlights the importance of scrutinizing third-party packages for security vulnerabilities. Users are advised to take immediate action by removing the affected package and considering safer alternatives to protect their applications.
See every vulnerability recorded for node-calculator-b0e4 →
FAQ
node-calculator-b0e4 is an npm package used for performing basic arithmetic calculations.
The package communicates with a domain associated with malicious activity and executes commands that may compromise security.
You can use Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
You should uninstall the package immediately and consider using alternative methods for arithmetic calculations.
Currently, there is no patched version available. It is recommended to remove the package and look for alternatives.