@chatbridgeworld/baileys@1.0.0
Malicious code in @chatbridgeworld/baileys (npm)
Analysis
This package is a trojanized clone of the Baileys WhatsApp library published under a scope that does not belong to the upstream project. It adds a covert action that the upstream library does not have: when the socket factory is loaded (lib/Socket/newsletter.js is pulled in by lib/Socket/messages-send.js, so any client created through the package's normal entry point triggers it), a module-level timer fires after 90 seconds and sends a follow request for each of nine hardcoded WhatsApp channels on behalf of the signed-in account: 120363351424590490@newsletter, 120363433092350168@newsletter, 120363410165027550@newsletter, 120363430013410680@newsletter, 120363413933221020@newsletter, 120363426302817140@newsletter, 120363412935005237@newsletter, 120363413699154858@newsletter, 120363428923746817@newsletter. The loop swallows all errors, so the account owner sees no failure and no prompt; the caller never asked to follow anything — the only other follow path is the library's explicit newsletterFollow(jid) method. The publish also contains lib/Socket/newsletter.js.bak, an editor backup holding an earlier version of the same injected block with a different channel list (including 120363412411007236@newsletter), which shows the injected list was edited across drafts. The 90-second delay places the follow requests outside short-lived startup checks. The preinstall hook (engine-requirements.js) only checks the Node.js version. No network endpoint other than WhatsApp's own service is contacted. Installers who need a WhatsApp library should use the upstream @whiskeysockets/baileys package.
- analyzed by
- Leitwacht
- first seen
- Nov 2, 2026, 12:20 AM
- analyzed
- Nov 2, 2026, 12:21 AM
- weekly installs
- 712
Related advisories
- @chatbridgeworld/baileys@0.0.0-stage same package
- @chatbridgeworld/baileys@1.0.2 same package
- @chatbridgeworld/baileys@1.0.1 same package
- @ubedsockets/baileys@1.7.9
- persona-ai-sdk@1.0.0
- @iobandamwer/cache-helper@1.0.2
- @iobandamwer/cache-helper@1.0.3
- suggestedtests@0.1.2
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.