@sapp1/baileys-pro@1.0.1
Malicious code in @sapp1/baileys-pro (npm)
Analysis
This package is a modified fork of the Baileys WhatsApp library with covert channel-promotion behaviour grafted onto it. In lib/Socket/newsletter.js, makeNewsletterSocket() schedules nested setTimeout callbacks that immediately issue FOLLOW queries (QueryIds.FOLLOW via the w:mex newsletter query) for six hardcoded WhatsApp channel JIDs: 120363425035744417@newsletter, 120363418090359162@newsletter, 120363417635528181@newsletter, 120363407966143171@newsletter, 120363424788148794@newsletter and 120363404389855506@newsletter — the integrating user's account is silently subscribed to those channels. lib/Socket/dugong.js injects forwardedNewsletterMessageInfo with newsletterJid 120363367299421766@newsletterr and 120363404481963766@newsletterr (newsletterName "Merlin-Xmd") so messages sent through the library carry the author's channel promotion, and lib/Utils/messages.js hardcodes 120363418090359162@newsletter as a default newsletter context. lib/Utils/generics.js fetchLatestBaileysVersion() was retargeted to fetch version metadata from the author's own GitHub fork (raw[.]githubusercontent[.]com/kiuur/bails/master/src/Defaults/baileys-version.json) instead of the upstream project. All other network traffic goes to WhatsApp endpoints (web[.]whatsapp[.]com, g[.]whatsapp[.]net, v[.]whatsapp[.]net). No credential, environment-variable or local-file collection was found in the package; the sole lifecycle hook is engine-requirements.js, which only exits when Node is below version 20.
- analyzed by
- Leitwacht
- first seen
- Nov 15, 2026, 09:59 AM
- analyzed
- Nov 17, 2026, 12:17 AM
- weekly installs
- 238
hxxps://github[.]com/what-sapp/Baileys Request takedown / dispute →Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.