@jiancodes/baileys@2.0.5
Malicious code in @jiancodes/baileys (npm)
Analysis
@jiancodes/baileys is a modified fork of the WhatsApp library baileys (@whiskeysockets/baileys) whose README instructs users to install it as an alias for the canonical package name, so it can be pulled in transparently by existing WhatsApp bots. The fork ships a hidden block that is not part of upstream Baileys: in lib/Socket/newsletter.js, inside makeNewsletterSocket, a timer fires 90 seconds after the newsletter socket is created and silently asks the operator's authenticated WhatsApp account to follow two hardcoded channels; a second channel is followed 5 seconds later. Both channel identifiers are base64-encoded in the source and decode to 120363399266188954@newsletter and 120363402472932012@newsletter. The request is a w:mex GraphQL query with query id Types_1.QueryIds.FOLLOW sent over the WhatsApp websocket (wss://web[.]whatsapp[.]com/ws/chat). Every error is swallowed in empty catch blocks, and the block carries the taunting comment "ngapain liat', mau fomo juga kah?" ("why are you looking, want to fomo too?"), i.e. it is deliberately hidden from anyone reading the package. Consequence: installing the fork and running a bot silently subscribes the operator's own WhatsApp account to third-party channels, generating subscription traffic on the victim's authenticated session without consent. The publish also contains lib/index.js.bak, an editor backup sidecar sitting next to the executed lib/index.js banner module. No other network destination besides the WhatsApp websocket appears in the shipped code.
- analyzed by
- Leitwacht
- first seen
- Nov 15, 2026, 09:13 AM
- analyzed
- Nov 16, 2026, 12:10 AM
Related advisories
- @jiancodes/baileys@2.0.3 same package
- @jiancodes/baileys@2.0.6 same package
- @risacakep/risayap@7.0.0-rc25.15
- @lasha_lasha/helper@1.0.0
- thienc-cdn@1.0.0
- yuliawhh@2.0.0
- @nakano-cjs/baileys@1.0.2
- @violetix/baileys@0.6.1
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.