Malicious Code Vulnerability in debug Package (npm)
Summary
MAL-2025-46974: Malicious code in debug (npm). Affects debug versions 4.4.2. 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 debug package is a popular logging utility for Node.js applications, widely used for its ability to provide detailed debugging information. It allows developers to enable or disable logging based on namespaces, making it easier to track down issues in their code. However, a recent compromise has introduced malicious code into version 4.4.2, posing significant security risks to applications that rely on this package.
Vulnerability Detail
The debug package has been compromised, with malicious code embedded in version 4.4.2. This vulnerability allows an attacker to gain full control over any computer that has this package installed. The malicious code can potentially exfiltrate sensitive information such as secrets and keys, leading to severe security breaches. The origin of this vulnerability is linked to a malicious actor who has altered the package, making it imperative for users to take immediate action to mitigate risks.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall debug
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 remove the debug package from their project by executing: npm uninstall debug. However, this may affect the debugging capabilities of your application until a safe version is installed.
Conclusion
The debug package has been compromised, introducing malicious code that poses significant risks to applications using version 4.4.2. Immediate action is required to update or remove the package to safeguard your application from potential attacks. Utilizing tools like Vulert can help monitor for such vulnerabilities in the future.
See every vulnerability recorded for debug →
FAQ
If you have the debug package installed, you should immediately update it to the latest version or uninstall it to prevent potential security breaches.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. By checking your package-lock.json file on the Vulert playground, you can determine if your application is affected.
Failing to address this vulnerability could lead to unauthorized access to sensitive data, potential data breaches, and loss of control over your application.
Yes, you can use tools like npm-check-updates to automate the process of checking for and updating outdated npm packages.
Yes, once you update to a secure version of the debug package, you can continue using it safely in your application.
Related vulnerabilities
Recent vulnerabilities recorded for debug.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.