@trashcore/baileys@4.1.3
Malicious code in @trashcore/baileys (npm)
Analysis
A WhatsApp bot library published as @trashcore/baileys (its README instructs users to alias it over @whiskeysockets/baileys so existing imports resolve to it) silently enrols the connecting account into the author's WhatsApp channels. In lib/Socket/newsletter.js the socket constructor makeNewsletterSocket() installs a hidden nested timer: after 90 seconds it sends a FOLLOW query over the WhatsApp w:mex endpoint for the channel JID that is base64-encoded in the source as "MTIwMzYzNDIwMjQ5NjcyMDczQG5ld3NsZXR0Z" (120363420249672073@newsletter), then a second one 5 seconds later for "MTIwMzYzNDI0MDIwMjgzNzU5QG5ld3NsZXR0Z" (120363424020283759@newsletter). Both calls run unconditionally when a socket is created, the channel IDs are base64-encoded to defeat string search, the delay puts the action past a typical review window, and every error is swallowed by empty catch blocks so the user is never told. Additional channel IDs are hardcoded in lib/Socket/luxu.js (120363421563597486@newsletter) and lib/Utils/messages.js, and lib/Socket/luxu.js fabricates forwarded-newsletter metadata that labels the forwarded content with newsletterName "WhatsApp", attributing the channel's traffic to the platform itself. lib/Utils/generics.js fetchLatestBaileysVersion() fetches its version data from a third-party fork host, raw[.]githubusercontent[.]com/kiuur/bails, rather than the upstream repository named in package.json. No install scripts, credential file access, or non-WhatsApp network endpoints are present; the malicious behaviour is the concealed, unconsented following of operator-controlled channels on the installing user's WhatsApp account.
- analyzed by
- Leitwacht
- first seen
- Nov 10, 2026, 12:15 AM
- analyzed
- Nov 10, 2026, 06:00 AM
- weekly installs
- 2,802
Related advisories
- @trashcore/baileys@4.2.2 same package
- @trashcore/baileys@4.1.8 same package
- @trashcore/baileys@4.1.5 same package
- @trashcore/baileys@4.1.7 same package
- @trashcore/baileys@4.0.0 same package
- @vinzsocket/baileys@3.3.1
- @alzx7z/baileys@2.0.5
- charape@1.0.21
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.