@mrlegendbot/baileys (npm) · Malicious Code
Affects @mrlegendbot/baileysSource GCVE Database
Malicious package : remove @mrlegendbot/baileys and rotate any secrets on hosts that installed it.
Data as of 2 Nov 2026, 18:31 UTC
Malicious package
Published to npm · OSV MAL-2026-15819
What to do
Remove @mrlegendbot/baileys from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npm@mrlegendbot/baileys | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
@mrlegendbot/baileys versions 1.2.4 and 1.2.5 contain malicious code that causes the victim's WhatsApp account to automatically follow attacker-chosen newsletter channels. This behavior is triggered by a hidden function that fetches a list of channel IDs from a remote GitHub repository and follows them at regular intervals without user consent. The malicious code is not present in the upstream library and can be updated dynamically by the attacker without releasing a new package version.