MAL-2026-15819 Malicious code in @mrlegendbot/baileys (npm)
Malicious package
Published
MAL-2026-15819 is a malicious package: @mrlegendbot/baileys (npm). Every version was published to cause harm.
Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.
Reference: https://insights.sbomify.com/MAL-2026-15819/ (Markdown: https://insights.sbomify.com/MAL-2026-15819/index.md)
- Package
- @mrlegendbot/baileys
- Registry
- npm
What is MAL-2026-15819?
MAL-2026-15819 is a malicious package in @mrlegendbot/baileys, published on 1 Sep 2026.
Official description
@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.
What should I do about MAL-2026-15819?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.