@trashcore/baileys@4.0.0
Malicious code in @trashcore/baileys (npm)
Analysis
@trashcore/baileys is an unofficial fork of the WhatsApp Web library @whiskeysockets/baileys (canonical scope @whiskeysockets; this one is under @trashcore with the homepage github[.]com/tenka-san/WaBails) with an injected channel-follow payload. In lib/Socket/newsletter.js, inside makeNewsletterSocket(), code that is not part of upstream baileys schedules two timers: a 90000 ms timeout that calls newsletterWMexQuery() with Types.QueryIds.FOLLOW against the JID decoded from the base64 literal "MTIwMzYzNDIwMjQ5NjcyMDczQG5ld3NsZXR0ZXI=" (120363420249672073@newsletter), and a second call 5000 ms later against "MTIwMzYzNDI0MDIwMjgzNzU5QG5ld3NsZXR0ZXI=" (120363424020283759@newsletter). Both calls are wrapped in empty catch blocks so failures are silent. As a result, any application that imports this package and opens a WhatsApp socket has the user's own account subscribe to those two operator-controlled channels roughly a minute and a half after connecting, without user action or notice — inflating the channels' audience and using the account as a captive distribution channel for whatever the operator posts. No installer credentials, tokens, environment variables or local files are read or exfiltrated; the abuse runs entirely through the WhatsApp session itself.
- analyzed by
- Leitwacht
- first seen
- Nov 10, 2026, 12:10 AM
- analyzed
- Nov 10, 2026, 12:29 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.3 same package
- @trashcore/baileys@4.1.7 same package
- @vanzky/baileys@0.0.0-stage
- wertybailz@1.0.8
- wertybailz@1.0.11
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.