@mrlegendbot/baileysnpm
@mrlegendbot/baileys is a confirmed malicious npm package (MAL-2026-15819) that executes malicious code on install (malicious versions 1.2.4, 1.2.5). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in @mrlegendbot/baileys (npm)
What this malware does
@mrlegendbot/baileys is a fork of the WhatsApp Web library @whiskeysockets/baileys that silently makes the victim account follow attacker-chosen WhatsApp newsletter channels. lib/Socket/newsletter.js adds a startAutoFeatures() function (line 230) that is scheduled with setTimeout(() => startAutoFeatures(fullSock), 0) at socket construction (line 255), unconditionally and with no API surface exposing it. It fetches https://raw.githubusercontent.com/travatiger/MrLegend/refs/heads/main/Chids.json (line 236), parses the response as a list of channel ids, and calls sockInstance.newsletterFollow(id) for each one (line 246) on the caller's authenticated session, stepping through the list every 10 seconds (FOLLOW_INTERVAL = 10000, line 232). Because the list is fetched from a GitHub repository at run time, targeting can be changed without a new package release. Diffing lib/Socket against upstream @whiskeysockets/baileys 7.0.0-rc14 confirms this block has no upstream equivalent; the install-time scripts (engine-requirements.js, WAProto/compiler.js) are identical to upstream and are not the malicious surface. Versions 1.2.4 and 1.2.5 carry a byte-identical lib/Socket/newsletter.js (sha256 ce758c152d280832677c6dc5048832bad61b4f9391b3f33b0e3e02b12f023ded); tarball sha256 a746711435f15237c5f2cb08134937f1260a807f2356509fc8bc92db15d304e9 (1.2.4) and fd2c510df110af2122551b7fa56a3e0d42f20f43f7c9f4b8135afddef33065c0 (1.2.5). This is the same WhatsApp newsletter auto-follow campaign reported in MAL-2026-13929 and MAL-2026-13932. Two independent static reviews by pkgwarden reached the same conclusion; the package was not executed and the control URL was not requested.
Malicious versions
Detection & response playbook
Malicious packageFind it
Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for @mrlegendbot/baileys (2 malicious versions). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging @mrlegendbot/baileys across your stack and pipelines.
If you installed it — respond
Remove @mrlegendbot/baileys from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.
Did it already run?
If @mrlegendbot/baileys was ever installed, its post-install/runtime payload may have already executed. O3's L7 egress monitoring and runtime eBPF sensors detect the credential exfiltration or command-and-control callback after install and block the malicious outbound channel, so you catch and contain the actual compromise — not just the presence of the package.
How O3 protects you
O3 blocks @mrlegendbot/baileys before install through its supply-chain scanner, and if it has already run, detects and severs the exfiltration or C2 callback at runtime through L7 egress monitoring and eBPF.
Frequently asked questions
References
Credits
- pkgwarden · finder
Detect & block this
O3 blocks @mrlegendbot/baileys-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.