NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
Malicious package

@mrlegendbot/baileysnpm

Advisory published Updated

@mrlegendbot/baileys is a confirmed malicious npm package (MAL-2026-15819) that opens a backdoor for remote access (malicious versions 1.0.0, 1.1.0, 1.1.1…). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in @mrlegendbot/baileys (npm)

MAL-2026-15819
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall @mrlegendbot/baileys

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.

CyberXYZ read every other published version statically on 2026-10-30 and 2026-11-01 (nothing was executed); with them, every published version is listed. All schedule the same startAutoFeatures() at socket creation and fetch the same Chids.json list. 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.2.3, 1.2.6 and 1.2.7 share a reformatted lib/Socket/newsletter.js (sha256 a8033938993216b828e06e57e8b78f75ff10e11ee331b4345676f40f6a40a1f4): 5 seconds after the socket is created it fetches the list and calls newsletterFollow(id) for each entry, 10 seconds apart, swallowing errors and without telling the user. 7.0.0-rc14 (sha256 2a45802b3e137ea232c3e14f84c2793b90bc937e3cfc47ab6407d0cdea06bdc1) and 1.0.0 (sha256 1ea8a7d706ce86cfe78ccec66b20c10d37f68163a146ce1deb95940c6cfdd3ac) do the same and, before following, also make the account react to the channels' last 50 posts and to each new post (enableAutoReaction, reactToAllNewMessages).

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Malicious versions

11 flagged
1.0.01.1.01.1.11.2.01.2.11.2.31.2.41.2.51.2.61.2.77.0.0-rc14

Indicators of compromise (SHA-256)

f86f02d1a202104ae56b2ace5afafe722f2b7f92e305fe586d45bd253298780e

Detection & response playbook

Backdoor / remote access
  1. Find it

    Search your lockfiles and build artifacts for @mrlegendbot/baileys (11 malicious versions).

  2. If you installed it — respond

    @mrlegendbot/baileys establishes remote access, so treat any host that installed it as fully compromised. Isolate the machine, remove the package, rotate all credentials it could reach, and rebuild from a trusted image rather than cleaning in place — a backdoor may have planted additional persistence.

  3. Did it already run?

    If @mrlegendbot/baileys was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.

Frequently asked questions

No. @mrlegendbot/baileys on npm has been identified as a malicious package (versions 1.0.0, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.2.3, 1.2.4, 1.2.5, and 3 more flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

GHSA-g94h-cm42-jgx8

References

Credits

  • pkgwarden · finder
  • CyberXYZ · 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 C2 callback and severs the channel.

Explore

@mrlegendbot/baileys (npm) malicious package — MAL-2026-15819 | O3 Security