MAL-2026-20292: Malicious code in @kingorwot/my-baileys (npm)
--- -= Per source details. Do not edit below this line.=-
Source: amazon-inspector (e1139544c4c6b9006f15627d80ecbecd930289cdd1532307bc9777e8f32490e3) This Baileys fork declares a production dependency whatsapp-rust-bridge-baron sourced from git+https://github.com/7ucg/whatsapp-rust-bridge.git with no commit SHA or tag pin. npm install resolves this to whatever HEAD of that third-party repo contains at install time, including any lifecycle scripts inside it, and the repo owner (7ucg) is not the publisher of this package. In addition, the ESM entry (lib/index.js) schedules a 120-second-delayed task on socket creation that fetches a channel-ID list from https://raw.githubusercontent.com/DGXeon13/strings/refs/heads/main/strings.json and issues WhatsApp newsletter FOLLOW mutations for each ID using the installer's authenticated session, with errors swallowed and no README disclosure. The JSON file is under the author's personal GitHub account and mutable at any time, allowing the author to retarget the installer's account to follow arbitrary channels. The CJS main (lib/index.cjs) does not contain the auto-follow path.
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed to the automatic WhatsApp channel follows?
Deployments that load the ESM entry point, lib/index.js, and create a socket are exposed. The CJS main, lib/index.cjs, does not contain the auto-follow behavior.
What conditions are required for the channel-follow behavior to run?
A socket must be created through the ESM entry point. The task is scheduled 120 seconds later and uses the authenticated WhatsApp session to follow channel IDs obtained from a remotely hosted, mutable JSON file.
Does installation itself carry risk?
Yes. The package declares a production dependency from a third-party Git repository without a commit SHA or tag pin, so npm install resolves whatever is at that repository's HEAD at installation time, including lifecycle scripts.
What can be done if the package cannot be removed immediately?
Avoid loading the ESM entry point and avoid creating sockets through it, since the described auto-follow path is in lib/index.js rather than lib/index.cjs. Installation risk remains because the unpinned Git dependency can change at any time.
How can I determine whether the affected behavior may have occurred?
Check whether your application imports or resolves lib/index.js and creates an authenticated socket. Review the affected WhatsApp account's followed newsletters, since errors from the follow mutations are swallowed.