yagami-bail@1.0.5
Malicious code in yagami-bail (npm)
Analysis
Verified from source: lib/Socket/newsletter.js embeds an unconditional setTimeout(5000) inside makeNewsletterSocket that silently issues a WhatsApp GraphQL follow-channel mutation (QueryIds.FOLLOW = "7871414976211147") to a hardcoded channel JID obfuscated in base64 ("MTIwMzYzNDAxNDY3OTM5MDU2QG5ld3NsZXR0ZXI=" = "120363401467939056@newsletter"), wrapped in catch{} so failures are invisible. I traced the composition chain (makeWASocket → … → makeMessagesSocket → makeNewsletterSocket), so this arms automatically for every consumer 5 seconds after connecting to WhatsApp — the authenticated victim's account is silently enrolled into a third-party channel with no API surface, opt-in, or disclosure. This is unauthorized account manipulation performed covertly through the user's identity, with deliberate obfuscation that serves only to defeat static review. The first agent's benign verdict rested on a failed grep: they searched for newsletterFollow()/newsletterAction() invocations and found none, but the payload is a raw newsletterWMexQuery(jid, QueryIds.FOLLOW) fired from a timer with a base64-encoded JID — I decoded it and confirmed the mutation ID. Their remaining benign observations (benign engine-check preinstall hook, no credential theft, standard WhatsApp endpoints, ffmpeg exec in media utils) were independently re-verified and hold, but do not offset the payload. No credible benign explanation exists; upstream Baileys contains no such timer. Malice is clear from code I read myself.
- analyzed by
- Leitwacht
- first seen
- Nov 15, 2026, 10:01 AM
- analyzed
- Nov 16, 2026, 12:21 AM
- weekly installs
- 236
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.