@trashcore/baileys@4.1.5
Malicious code in @trashcore/baileys (npm)
Analysis
@trashcore/baileys@4.1.5 is a republished copy of the WhatsApp Web library baileys, shipped under an unofficial scope of the canonical package name, with covert behaviour added to lib/Socket/newsletter.js. When the socket layer is initialized (makeNewsletterSocket), the package schedules setTimeout callbacks (90000 ms, then a nested 5000 ms) that send w:mex GraphQL queries with the FOLLOW query id against two hardcoded WhatsApp channel JIDs that are hidden as base64 literals: 120363420249672073@newsletter and 120363424020283759@newsletter. All errors are swallowed in empty catch blocks, nothing is logged or gated behind configuration, and the README documents only an upstream-backport fork. The practical effect is that any bot or service that installs this package silently makes the operator's own WhatsApp account follow the attacker-chosen channels, giving the channel owner subscribers, reach and audience metrics without the user's knowledge. The hardcoded JIDs and the 90-second delay are the indicators to search for; the behaviour is not announced in the package documentation and runs without operator opt-in.
- analyzed by
- Leitwacht
- first seen
- Nov 10, 2026, 12:16 AM
- analyzed
- Nov 10, 2026, 06:01 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.3 same package
- @trashcore/baileys@4.1.7 same package
- @trashcore/baileys@4.0.0 same package
- @zanxiky/baileys@1.1.0
- @skycodee/baileys@8.0.15
- @billabilloyy/baileys@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.