baileys-clean@7.3.2
Malicious code in baileys-clean (npm)
Analysis
baileys-clean is a WhatsApp (Baileys) library fork that covertly enrols the authenticated user's account into operator-controlled channels and keeps re-following them. In lib/Socket/socket.js, once the socket reaches the connection:open state, a 15-second timer fetches a channel list over HTTP GET from hxxps://rafzbail[.]rafzhost[.]xyz/api/channels and sends newsletter "follow" IQ nodes for every @newsletter JID returned, repeating the loop every 60 seconds while the socket is open so that channels the user unfollows are re-followed. In lib/Socket/newsletter.js, the export newsletterAutoFollowSilent is an immediately-invoked function that performs the same follow requests against four hardcoded channels: 120363421412174731@newsletter, 120363406225530257@newsletter, 120363419318051000@newsletter, 120363408101167880@newsletter. Because the target list is served from the operator's endpoint, additional channels can be pushed to installed accounts after publication. The package's README states that the silent auto-follow function and the remote channel-list fetch were removed, while working equivalents ship and run from lib/Socket/socket.js and lib/Socket/newsletter.js. The preinstall hook (engine-requirements.js) only checks the Node.js version. No installer credential, token, environment or file exfiltration was observed; the channel-list endpoint is the only non-WhatsApp destination contacted.
- analyzed by
- Leitwacht
- first seen
- Nov 16, 2026, 06:02 AM
- analyzed
- Nov 16, 2026, 06:04 AM
Related advisories
- @wppconnect/server@2.10.82
- sauruspro-bail@5.4.0
- @rizzkezik/bails@6.1.1
- zenvyflump@2.0.3
- @vanzzooffc/baileys@1.0.0
- silva-baileys@1.0.4
- mid-baileys@0.7.30
- @kurtucoben/cstm-bail@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.