@zaiinlin/bails@1.0.7
Malicious code in @zaiinlin/bails (npm)
Analysis
@zaiinlin/bails is a fork of the Baileys WhatsApp Web library that covertly enrols the linked WhatsApp account into channels chosen at runtime by the package author. lib/Socket/newsletter.js decodes a base64 literal to hxxps://raw[.]githubusercontent[.]com/zaiinlin/idch/refs/heads/main/channel.json, fetches that JSON when the socket is created, and — after the WhatsApp connection opens — sends newsletter-follow queries (query id FOLLOW, path xwa2_newsletter_follow) for every <id>@newsletter entry in the remote list, spaced 10 s + 5 s per entry, with no configuration or consent. Because the list is remote, the followed channels can change at any time without a new release. lib/Socket/luxu.js additionally hardcodes channel JIDs 120363421563597486@newsletter ("D | 7eppeli-Exloration") and 120363399602691477@newsletter and injects them into forwardedNewsletterMessageInfo (forwardingScore 1 or 99999, remoteJid status@broadcast) on outgoing event and poll messages, spreading the operator's channel through users' chats. The manifest lists the package itself as its own dependency (@zaiinlin/bails ^1.0.6), pins ~60 unrelated packages, and depends on cache-manager ^7.2.8, which resolves to a separately reported malicious version, so malicious code is installed alongside it. Its preinstall hook (engine-requirements.js) is only a Node.js >=20 version check.
- analyzed by
- Leitwacht
- first seen
- Nov 8, 2026, 11:09 PM
- analyzed
- Nov 8, 2026, 11:10 PM
Related advisories
- charape@1.0.21
- charape@1.0.4
- @denzz221/baileys@8.0.5
- @denzz221/baileys@7.0.0
- @zhengliyoux/baileys@1.0.4
- @rizzkezik/bails@6.1.1
- elaina-baileys@1.0.2
- wertybailz@1.0.6
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.