Malicious Code Injection in @kelvdra/baileys: Covert Channel Subscription Vulnerability
Summary
MAL-2026-17362: Malicious code in @kelvdra/baileys (npm). Affects @kelvdra/baileys versions 1.0.5-rc.3 – 1.0.6-rc.1. 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 @kelvdra/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 similar packages that have been identified as potentially malicious. This specific package has been found to contain code that silently subscribes users to channels without their consent, leveraging the user's authenticated WhatsApp session.
Vulnerability Detail
The vulnerability arises from malicious code embedded within the @kelvdra/baileys package. This code injects a covert action into the WhatsApp socket layer, which executes an authenticated 'w:mex' FOLLOW query to subscribe the victim's account to attacker-controlled channels. The target JIDs are obfuscated using various techniques, making it difficult for users to detect the malicious behavior. The vulnerability does not exfiltrate user credentials or execute arbitrary code but does abuse 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 @kelvdra/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, consider removing the @kelvdra/baileys package from your project until a secure version is confirmed. You can do this using the command: npm uninstall @kelvdra/baileys. Additionally, monitor your application for any unauthorized subscriptions to WhatsApp channels.
Conclusion
The @kelvdra/baileys package contains a serious vulnerability that allows malicious actors to subscribe users to channels without their consent. It is crucial for developers to update or remove this package to protect their users. Utilizing tools like Vulert can help in monitoring and identifying such vulnerabilities in real-time.
See every vulnerability recorded for @kelvdra/baileys →
FAQ
The primary risk is that users may be unknowingly subscribed to channels controlled by attackers, which can lead to unwanted content and potential privacy concerns.
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 version of @kelvdra/baileys, it is recommended to uninstall it immediately and check for any unauthorized subscriptions on your WhatsApp account.
Yes, this vulnerability is part of a larger family of similar malicious packages that employ various obfuscation techniques to hide their malicious actions.
No, this vulnerability does not exfiltrate user credentials; however, it does misuse the authenticated session to perform unauthorized actions.