Covert Channel Subscription Vulnerability in @mivesensei/baileys Package
Summary
MAL-2026-17368: Malicious code in @mivesensei/baileys (npm). Affects @mivesensei/baileys versions 0.4.2. 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 @mivesensei/baileys package is a fork of the Baileys WhatsApp Web library, designed to facilitate interactions with the WhatsApp Web API. It is part of a larger family of over 100 similar forks, which have been identified as potentially malicious. The package allows developers to integrate WhatsApp functionalities into their applications, but it has been compromised to include malicious code that exploits users' authenticated sessions.
Vulnerability Detail
The vulnerability arises from malicious code injected into the @mivesensei/baileys package, which establishes a covert channel-subscription action within the WhatsApp socket layer. Upon connection, the code executes an authenticated 'w:mex' FOLLOW query against attacker-controlled WhatsApp Channel/Newsletter JIDs, using the victim's own authenticated session. This silently subscribes the victim's account to channels without their consent. The obfuscation techniques used to hide the target JIDs include plain string literals, base64 encoding, and dynamic fetching of target lists from remote sources, making detection difficult. While the malicious action does not exfiltrate credentials or execute arbitrary code, it manipulates the victim's account for the attacker's benefit.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @mivesensei/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 workaround, you can remove the @mivesensei/baileys package from your project until a secure version is released. Use the following command to uninstall the package: npm uninstall @mivesensei/baileys.
Conclusion
The @mivesensei/baileys package contains a serious vulnerability that allows malicious actors to exploit users' authenticated WhatsApp sessions for unauthorized channel subscriptions. It is essential for developers to take immediate action by updating or removing the package to protect their applications and users.
See every vulnerability recorded for @mivesensei/baileys →
FAQ
The vulnerability involves malicious code that subscribes users to WhatsApp channels without their consent, using their authenticated session.
You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to analyze your package-lock.json.
If you are using the @mivesensei/baileys package, it is crucial to update to a patched version or remove the package entirely until a fix is available.
No, the vulnerability does not exfiltrate credentials; it only manipulates the victim's account to subscribe to channels.
Regularly monitor your dependencies for vulnerabilities using tools like Vulert and keep your packages updated to the latest secure versions.