Critical Malicious Code Vulnerability in doscolors Package
Summary
MAL-2025-18654: Malicious code in doscolors (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 doscolors package is a Node.js library designed to provide color formatting for console output. It is widely used in various applications to enhance the visual presentation of command-line interfaces. However, the package has been found to contain malicious code, posing significant risks to users and their applications.
Vulnerability Detail
The vulnerability in the doscolors package stems from the inclusion of malicious code that can compromise the security of applications utilizing this library. This code can lead to unauthorized access, data breaches, or even system compromise. The issue was introduced in version 0 and affects all subsequent versions, making it critical for users to take immediate action to mitigate potential risks.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall doscolors
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 doscolors package from their project until a secure version is released. This can be done using the command: npm uninstall doscolors. Alternatively, consider using a different package that provides similar functionality without the associated risks.
Conclusion
The discovery of malicious code in the doscolors package highlights the importance of vigilance in managing open-source dependencies. Users are urged to update or remove the package to protect their applications from potential threats. Regular monitoring for vulnerabilities is essential to maintain application security.
See every vulnerability recorded for doscolors →
FAQ
doscolors is a Node.js library that allows developers to format console output with colors, enhancing the user experience in command-line applications.
The malicious code was identified by security researchers from Amazon Inspector, who regularly monitor open-source packages for vulnerabilities.
The malicious code can lead to unauthorized access to sensitive data, data breaches, and potential system compromise, putting users at significant risk.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Simply upload your package-lock.json file to check for vulnerabilities without any installation.
Yes, you can use the Vulert playground to monitor your application for vulnerabilities. Visit Vulert Scanner to check if your application is affected without needing to sign up.