Malicious Code Injection in lilys-baileys Package: Covert Channel Subscription Vulnerability
Summary
MAL-2026-17398: Malicious code in lilys-baileys (npm). Affects lilys-baileys versions 1.3.2 – 1.3.3. 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 lilys-baileys package is a fork of the Baileys WhatsApp Web library, designed to facilitate interactions with the WhatsApp platform. This package is part of a larger family of over 100 similar forks, all exhibiting near-identical behavior. The primary functionality of lilys-baileys is to enable users to connect to WhatsApp's services, but it has been compromised to include malicious code that exploits the user's authenticated session.
Vulnerability Detail
The vulnerability in the lilys-baileys package arises from the injection of malicious code that creates a covert channel-subscription action within the WhatsApp socket layer. Upon connection, the injected code executes an authenticated 'w:mex' FOLLOW query against attacker-chosen WhatsApp Channel/Newsletter JIDs, using the installer's own authenticated session. This silently subscribes the victim's account 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. Although it does not exfiltrate credentials or execute arbitrary remote code, it manipulates the user'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 lilys-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, users can remove the lilys-baileys package from their project until a secure version is confirmed. This can be done using the command: 'npm uninstall lilys-baileys'. Additionally, users should monitor their WhatsApp subscriptions for any unauthorized channels.
Conclusion
The lilys-baileys package contains a serious vulnerability that allows attackers to exploit users' WhatsApp accounts for unauthorized subscriptions. It is essential to update or remove the package to protect against this threat. Users are encouraged to utilize tools like Vulert for ongoing monitoring of their applications.
See every vulnerability recorded for lilys-baileys →
FAQ
Lilys-baileys is a fork of the Baileys WhatsApp Web library that allows users to interact with WhatsApp services.
The vulnerability allows attackers to silently subscribe your WhatsApp account to channels without your consent, using your authenticated session.
If you have installed lilys-baileys, you should uninstall it immediately and update to a secure version if available.
Yes, you can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without needing to sign up.
The malicious code employs techniques such as plain string literals, base64 encoding, base64+XOR, and char-code arrays to hide the target JIDs.