Malicious Auto-Following Behavior in @zeronexcode/baileys Package
Summary
MAL-2026-17326: Malicious code in @zeronexcode/baileys (npm). Affects @zeronexcode/baileys versions 7.0.0-zeronex.8. 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 @zeronexcode/baileys package is a popular library used for interacting with the WhatsApp Web API, allowing developers to build applications that can send and receive messages on WhatsApp. It provides a range of functionalities, including message handling, media management, and connection management. However, a recent vulnerability has been discovered that compromises user privacy and control over their WhatsApp accounts.
Vulnerability Detail
The vulnerability arises from the makeWASocket() function located in lib/Socket/index.js, which automatically makes the user's WhatsApp account follow a hardcoded channel (120363427099186895@newsletter) whenever a connection is established. This behavior occurs without any user consent or option to disable it, potentially leading to unwanted notifications and privacy concerns. The hardcoded nature of the channel means that users cannot opt-out, making it a significant security risk.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @zeronexcode/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
Currently, there is no official workaround to disable the auto-following behavior without modifying the package code. Users are advised to monitor the package repository for any updates or community-driven solutions.
Conclusion
The @zeronexcode/baileys package has a critical vulnerability that automatically follows a hardcoded WhatsApp channel without user consent. Users are urged to update to the latest version to mitigate this risk. Monitoring tools like Vulert can help keep track of such vulnerabilities in real-time.
See every vulnerability recorded for @zeronexcode/baileys →
FAQ
The vulnerability causes the user's WhatsApp account to automatically follow a specific channel without consent.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
Yes, users should update to the latest version of the @zeronexcode/baileys package to ensure they have the patch.
The risks include unwanted notifications from the channel and a breach of user privacy, as users have no control over following the channel.
While you can manually unfollow the channel in WhatsApp, the vulnerability allows it to be followed again upon reconnection.