Malicious Code Injection in monte-md-baileys: Covert Channel Subscription Vulnerability
Summary
MAL-2026-17399: Malicious code in monte-md-baileys (npm). Affects monte-md-baileys versions 1.0.0. 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 monte-md-baileys package is a fork of the Baileys WhatsApp Web library, designed to facilitate interactions with the WhatsApp API. It is part of a larger family of similar packages that have been identified as potentially malicious. This package, like its counterparts, is intended for developers looking to integrate WhatsApp functionalities into their applications. However, it has been compromised to include malicious code that exploits the user's authenticated session.
Vulnerability Detail
The monte-md-baileys package contains malicious code that injects a covert channel-subscription action into the WhatsApp socket layer. Upon connection, this code executes an authenticated 'w:mex' FOLLOW query against attacker-controlled WhatsApp Channel/Newsletter JIDs, using the installer's authenticated session. This results in the victim's account being silently subscribed to channels without their consent. The malicious code employs various obfuscation techniques to hide the target JIDs, making it difficult for users to detect the malicious behavior. The vulnerability does not exfiltrate credentials or execute arbitrary remote code but does misuse the user's session for unauthorized subscriptions.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall monte-md-baileys
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 measure, avoid using the monte-md-baileys package and consider alternative libraries that do not exhibit malicious behavior. Regularly review your package dependencies and utilize tools like Vulert to monitor for vulnerabilities in your project.
Conclusion
The monte-md-baileys package poses a significant risk due to its malicious code that exploits users' authenticated WhatsApp sessions. It is crucial for developers to remove this package and monitor their applications for any unauthorized activity. Utilizing tools like Vulert can help in identifying and mitigating such vulnerabilities in real-time.
See every vulnerability recorded for monte-md-baileys →
FAQ
monte-md-baileys is an npm package that serves as a fork of the Baileys WhatsApp Web library, allowing developers to interact with the WhatsApp API.
The vulnerability allows attackers to silently subscribe your WhatsApp account to channels without your consent, using your authenticated session.
You should uninstall the monte-md-baileys package immediately and monitor your application for any unauthorized subscriptions.
Yes, you can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The malicious code uses techniques such as plain string literals, base64 encoding, base64+XOR, and runtime char-code arrays to hide the target JIDs from casual review.