@dcloude/baileys@0.1.2
Malicious code in @dcloude/baileys (npm)
Analysis
A republished WhatsApp automation library fork that silently enrols the installing user's WhatsApp account into channels controlled by its author. lib/Defaults/index.js ships a hardcoded DEFAULT_AUTO_FOLLOW_CHANNELS array of 22 WhatsApp channel JIDs (e.g. 120363429884981859@newsletter, 120363411629646029@newsletter, 120363406620310731@newsletter, 120363429449887888@newsletter, 120363429324002976@newsletter, 120363413199437385@newsletter, 120363411652204506@newsletter, 120363429559850392@newsletter, 120363411227198037@newsletter, 120363427824447543@newsletter) and sets it as the default value of the autoFollowChannels socket option. lib/Socket/newsletter.js registers a 'connection.update' handler that, on the first successful connection, walks that list and issues a newsletter FOLLOW query (newsletterWMexQuery(jid, QueryIds.FOLLOW)) for every JID, subscribing the developer's own WhatsApp account to those channels. The behaviour is enabled by default and presented as opt-out in code comments; a blockAutoFollowChannels guard that is on by default seeds its allowlist from the same hardcoded JIDs, so it blocks other code from following channels while leaving the author's 22 channels followed. The package also bundles lib/antiban.cjs, a 132KB anti-detection module that inserts zero-width characters (U+200B, U+200C, U+200D, U+FEFF) and swaps words from a synonym table to vary outgoing message content and evade automated abuse detection, and its preinstall hook (node ./engine-requirements.js) enforces a Node.js version floor. No network destinations were observed other than WhatsApp/Meta endpoints; there is no credential, token or file exfiltration in the shipped code.
- analyzed by
- Leitwacht
- first seen
- Nov 1, 2026, 11:20 PM
- analyzed
- Nov 1, 2026, 11:21 PM
- weekly installs
- 542
Related advisories
- @dcloude/baileys@0.1.1 same package
- @dcloude/baileys@0.0.9 same package
- persona-ai-sdk@1.0.0
- @ifasn/mdd-doc-mcp@2.0.6
- tavern-ai-sdk@1.0.0
- claims-acct-unlock@25.2.1
- dependencykfeg@25.1.9
- random-transactions-sdk@1.0.4
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.