Malicious Code Injection in @rennnpm/baileys: Covert Channel Subscription Vulnerability
Summary
MAL-2026-17374: Malicious code in @rennnpm/baileys (npm). Affects @rennnpm/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 @rennnpm/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. The package allows developers to build applications that can send and receive messages via WhatsApp, but it has been compromised to include malicious code that exploits the user's authenticated session.
Vulnerability Detail
The vulnerability arises from the injection of malicious code into the @rennnpm/baileys package, which executes an unauthorized FOLLOW query to subscribe the victim's WhatsApp account to attacker-controlled channels. This occurs without the user's consent, leveraging their own authenticated session. The malicious code is obfuscated using various techniques to hide the target JIDs, making it difficult for users to detect the threat. While it does not exfiltrate credentials or execute arbitrary code, it can significantly impact user privacy and control over their WhatsApp subscriptions.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @rennnpm/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, you can remove the @rennnpm/baileys package from your project to prevent any malicious actions. Use the following command: npm uninstall @rennnpm/baileys. Additionally, consider using alternative libraries that do not exhibit these vulnerabilities.
Conclusion
The @rennnpm/baileys package contains a serious vulnerability that allows malicious actors to exploit users' authenticated WhatsApp sessions. It is crucial for developers to stay informed about such vulnerabilities, update their dependencies promptly, and utilize tools like Vulert to monitor their applications for security issues.
See every vulnerability recorded for @rennnpm/baileys →
FAQ
The main issue is the injection of malicious code that subscribes users to unwanted WhatsApp channels without their consent.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
If you have installed the affected package, you should immediately uninstall it and check for any updates or patches from the official repository.
No, the vulnerability does not exfiltrate credentials, but it does misuse your authenticated session to subscribe to channels.
Yes, consider using other libraries that provide similar functionality without the associated risks. Always review the security of third-party packages before use.