Critical Malicious Code Vulnerability in browser-readline Package
Summary
MAL-2025-16198: Malicious code in browser-readline (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 browser-readline package is an npm library designed to facilitate reading input from the command line in a browser environment. It is commonly used in applications that require user interaction through terminal-like interfaces. However, this package has been found to contain malicious code, posing significant risks to applications that rely on it.
Vulnerability Detail
The vulnerability in the browser-readline package stems from the inclusion of malicious code that can compromise the security of applications using this library. This code may lead to unauthorized access, data breaches, or other harmful actions within the affected systems. The malicious code was introduced in version 0 and affects all subsequent versions, making it imperative for users to take immediate action to mitigate the risks.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall browser-readline
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 browser-readline package in your application. Instead, consider using native JavaScript methods for handling user input or other libraries that do not have known vulnerabilities.
Conclusion
The discovery of malicious code in the browser-readline package highlights the importance of vigilance in managing dependencies. Users must act swiftly to remove the affected package and consider alternatives to safeguard their applications from potential threats.
See every vulnerability recorded for browser-readline →
FAQ
The malicious code can potentially allow unauthorized access to sensitive data or system functions, posing a significant security risk.
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.
Currently, there is no patched version available. It is advisable to remove the package until a secure alternative is found.
Remove the browser-readline package immediately and replace it with a secure alternative to mitigate any potential risks.
Vulert uses the package-lock.json file to monitor and alert for open-source vulnerabilities in your software without requiring access to the code or installation.