Malicious Code Injection in mikuhostt-baileys: Unauthorized WhatsApp Channel Subscriptions
Summary
MAL-2026-17447: Malicious code in mikuhostt-baileys (npm). Affects mikuhostt-baileys versions 1.0.0 – 1.0.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 mikuhostt-baileys package is a fork of the Baileys WhatsApp Web library, designed to facilitate interactions with the WhatsApp Web API. It is utilized by developers to create applications that can send and receive messages, manage contacts, and perform other WhatsApp-related functionalities. However, this package has been compromised, leading to unauthorized actions being performed on behalf of users without their consent.
Vulnerability Detail
The vulnerability stems from the publisher injecting malicious code into the mikuhostt-baileys package. This code exploits the user's authenticated WhatsApp session to automatically subscribe the user's account to specific WhatsApp Channels (newsletters) chosen by the publisher. The malicious behavior is triggered 90 seconds after the connection is established, sending a follow request to the publisher's channel without the user's knowledge. This covert action can inflate the publisher's subscriber count, compromising user trust and privacy.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall mikuhostt-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 avoid using the mikuhostt-baileys package until a secure version is released. Alternatively, you can manually inspect the package code for any malicious behavior before using it in your application.
Conclusion
The mikuhostt-baileys package has been compromised, leading to unauthorized actions that exploit users' WhatsApp sessions. It is crucial for developers to stay informed about such vulnerabilities and take proactive measures to secure their applications. Regular updates and monitoring tools like Vulert can help mitigate risks associated with open-source dependencies.
See every vulnerability recorded for mikuhostt-baileys →
FAQ
The vulnerability involves the injection of malicious code that uses the user's WhatsApp session to subscribe to channels without consent.
You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to test your application.
The primary consequence is the unauthorized subscription of users to WhatsApp Channels, which can lead to privacy violations and a loss of trust in the application.
Regularly update your dependencies and monitor them for vulnerabilities using tools like Vulert to ensure you are alerted to any issues.
If you have already used the compromised package, update it immediately and review your application's security to ensure no unauthorized actions have been taken.