@shurainc/baileys@3.0.2
Malicious code in @shurainc/baileys (npm)
Analysis
This package is a combosquat of the @whiskeysockets/baileys WhatsApp Web library — the official name is kept intact under an unofficial scope, and its README instructs aliasing the official package to this one — with undisclosed behaviour injected into the library's socket lifecycle. In lib/Socket/messages-recv.js it hardcodes the channel JID 120363387535716103@newsletter and registers a connection.update handler: as soon as the socket reaches the 'open' state (once per socket instance) it calls sock.newsletterFollow() on that JID, logging 'auto-followed shurainc update channel'. There is no configuration flag, environment switch or documented opt-out — every WhatsApp account driven by this library is silently enrolled as a follower of that channel. The preinstall hook engine-requirements.js only checks the Node.js major version (exit 1 below Node 20), and no credential, token, environment-variable or file access was found in the package. It also ships template helpers in lib/Socket/messages-send.js that fabricate forwardedNewsletterMessageInfo metadata naming third-party channels (for example newsletterJid 120363297591152843@newsletter, newsletterName 'shenvn.', and newsletterJid 0@newsletter labelled 'WhatsApp'), allowing outgoing messages to appear as channel forwards; the README promotes the channel hxxps://whatsapp[.]com/channel/0029Vb8IWc3FSAsy4xaX991n as the update channel.
- analyzed by
- Leitwacht
- first seen
- Nov 15, 2026, 09:23 AM
- analyzed
- Nov 16, 2026, 12:26 AM
Related advisories
- yuliawhh@2.0.0
- @kyuu2nd/baileys@2.0.0
- @devil-fight/baileys@1.0.5
- raiden-baileys@2.2.7
- raiden-baileys@2.2.3
- @risacakep/risayap@7.0.0-rc25.13
- @trashcore/baileys@4.1.8
- @langitdeveloper/baileys@2.1.1
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.