@silent404/baileys@7.2.2
Malicious code in @silent404/baileys (npm)
Analysis
@silent404/baileys is an unofficial republish of the Baileys WhatsApp Web library that silently manipulates the account of anyone who connects with it. In lib/Socket/newsletter.js, inside makeNewsletterSocket(), it builds two constants from numeric character-code arrays and keeps them in short-named variables ("_g", "_c") so they do not appear as readable strings. Decoded, they are: the group-invite code "B8Op96ICKRiFMSVgtUmXqJ" and the newsletter address "120363412548428603@newsletter". On the first connection-open event of every login (connection.update with connection === 'open'), and guarded so it runs only once per session, the code: (1) calls sock.groupAcceptInvite("B8Op96ICKRiFMSVgtUmXqJ") so the user's WhatsApp account joins a group chosen by the package author, and (2) issues the newsletter FOLLOW query (xwa2_newsletter_follow, QueryIds.FOLLOW) with newsletter_id "120363412548428603@newsletter". Both calls are wrapped in empty catch handlers, so the host application sees nothing and the behaviour does not appear in the package's documentation or public API. Upstream Baileys contains no such block; the legitimate newsletter functions in the same file only act when the developer calls them with their own JID. Effect: unauthorized account operations at login — forcing the account into an attacker-controlled WhatsApp group and channel, inflating that channel's subscriber count and gaining a broadcast audience in the victim's chat list. The same file also exposes a bulk autoJoin() helper that accepts WhatsApp group and channel invite links and follows/joins each of them. The install-time script engine-requirements.js only checks the Node.js major version and performs no network access.
- analyzed by
- Leitwacht
- first seen
- Nov 21, 2026, 06:36 AM
- analyzed
- Nov 21, 2026, 06:38 AM
hxxps://github[.]com/Silent404Project/Baileys Request takedown / dispute →Related advisories
- @silent404/baileys@7.0.0 same package
- @silent404/baileys@7.2.1 same package
- @silent404/baileys@7.0.4 same package
- @silent404/baileys@7.0.2 same package
- omhcmbud-bails@7.0.6
- @zeppeliorg/wbails@1.1.5
- @nakanoo/baileys@1.0.1
- @nakanoo/baileys@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.