Malicious Code Injection in cantarella-baileys: A Covert WhatsApp Subscription Threat
Summary
MAL-2026-17390: Malicious code in cantarella-baileys (npm). Affects cantarella-baileys versions 1.1.11 – 1.1.13. 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 cantarella-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 package, like its counterparts, has been found to contain code that can silently subscribe users to attacker-controlled WhatsApp channels without their consent, leveraging the user's authenticated session.
Vulnerability Detail
The vulnerability arises from the injection of malicious code into the cantarella-baileys package, which executes an unauthorized FOLLOW query against WhatsApp channels upon connection. This action uses the installer's own authenticated session to subscribe the victim's account to channels they did not intend to join. The malicious code is obfuscated using various techniques, making it difficult to detect during casual code reviews. The vulnerability does not exfiltrate user credentials or execute arbitrary code, but it does manipulate the user's WhatsApp account for malicious purposes.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall cantarella-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 cantarella-baileys package from their project until a secure version is available. This can be done using the following command: npm uninstall cantarella-baileys.
Conclusion
The cantarella-baileys package contains a significant vulnerability that allows for unauthorized subscriptions to WhatsApp channels. Users are advised to update or uninstall the package to mitigate risks. Utilizing tools like Vulert can enhance security by providing real-time alerts for vulnerabilities.
See every vulnerability recorded for cantarella-baileys →
FAQ
Cantarella-baileys is a JavaScript package that serves as a fork of the Baileys WhatsApp Web library, allowing developers to interact with the WhatsApp Web API.
The vulnerability allows attackers to silently subscribe users to their WhatsApp channels without their consent, using the user's own authenticated session.
You should immediately update the package to the latest version or uninstall it until a secure version is released.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground without any signup at Vulert Scanner.
Regularly auditing dependencies, using tools like Vulert for monitoring vulnerabilities, and keeping packages updated can help prevent similar issues.