Malicious Code Injection in @japofc/baileys: Covert Channel Subscription Vulnerability
Summary
MAL-2026-17359: Malicious code in @japofc/baileys (npm). Affects @japofc/baileys versions 2.1.0 – 2.4.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 @japofc/baileys package is a fork of the Baileys WhatsApp Web library, designed to facilitate interactions with the WhatsApp Web API. It allows developers to build applications that can send and receive messages, manage contacts, and perform various actions on WhatsApp. However, this package has been identified as part of a larger family of malicious forks that introduce covert actions into the WhatsApp socket layer, compromising user privacy and control.
Vulnerability Detail
The vulnerability arises from the injection of malicious code into the @japofc/baileys package, which executes an unauthorized FOLLOW query to subscribe the victim's WhatsApp account to attacker-controlled channels. This occurs without the user's consent, leveraging their authenticated session. The malicious code employs various obfuscation techniques to hide the target channel identifiers, making it difficult for users to detect the malicious behavior. The vulnerability does not exfiltrate user credentials or execute arbitrary remote code, but it does misuse the user's authenticated session for nefarious purposes.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @japofc/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 measure, users can avoid using the @japofc/baileys package until a patched version is confirmed. Additionally, users should review their package-lock.json file for any instances of the @japofc/baileys package and consider removing it from their project until the vulnerability is addressed.
Conclusion
The @japofc/baileys package has been compromised by malicious code that exploits users' authenticated WhatsApp sessions to subscribe them to unwanted channels. Users are advised to update their packages promptly and monitor their applications for any signs of compromise. Utilizing tools like Vulert can help in identifying vulnerabilities in real-time.
See every vulnerability recorded for @japofc/baileys →
FAQ
The vulnerability involves malicious code that subscribes users to attacker-controlled WhatsApp channels without their 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.
The affected versions of the @japofc/baileys package include 2.4.3, 2.4.2, 2.4.1, 2.4.0, 2.3.0, 2.2.0, and 2.1.0.
Yes, updating to the latest version of the @japofc/baileys package will resolve the vulnerability.
As a workaround, consider removing the package from your project until a secure version is confirmed.