Malicious package · npm
Malicious code in @kingorwot/my-baileys (npm)
2.0.03.0.04.0.0No safe version. Remove it.What it does
Version 4.0.0 carries the covert auto-follow described for 2.0.0 and 3.0.0. In lib/Socket/newsletter.js, 120 seconds after the socket is created, it fetches https://raw.githubusercontent.com/dgxeonking/strings/refs/heads/main/strings.json and sends the WhatsApp FOLLOW query for every channel ID in it, one every 11 seconds, using the installer's logged-in session, with all errors swallowed.
This package is a fork of the Baileys WhatsApp library with two installer-facing issues. First, package.json declares a runtime dependency whatsapp-rust-bridge-baron sourced from a bare git URL (git+https://github.com/7ucg/whatsapp-rust-bridge.git) with no commit SHA, tag, or integrity hash. On npm install, npm fetches whatever HEAD of that third-party GitHub repo currently returns and installs it with lifecycle scripts enabled; no vendored copy is shipped despite the bundledDependencies listing. The repository owner (7ucg) is independent of the publisher, so whoever controls that repo can ship arbitrary code into the installer's node_modules at any future install. Second, on socket creation in lib/index.cjs a hidden setTimeout(..., 120000) fetches https://raw.githubusercontent.com/dgxeonking/strings/refs/heads/main/strings.json from the author's GitHub at a mutable branch and iterates the list, silently invoking QueryIds.FOLLOW on the installer's logged-in WhatsApp session to add the installer's account as a follower of each channel ID. The behavior is undocumented and the list is author-mutable. The off-registry unpinned git dependency is the primary installer-harm vector; the covert auto-follow is a secondary misuse of the installer's authenticated WhatsApp session.
Reported by ghsa-malware 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.
No fix · Remove and contain
npm uninstall @kingorwot/my-baileysSources