@hanzofc/baileys@7.2.3
Malicious code in @hanzofc/baileys (npm)
Analysis
@hanzofc/baileys is a modified fork of the WhatsApp automation library @whiskeysockets/baileys, published under an unofficial scope with the canonical package basename. On the first successful connection open it silently subscribes the installing user's WhatsApp account to a channel chosen by the fork author: lib/Socket/index.js hardcodes AUTO_FOLLOW_NEWSLETTER_JIDS = ['120363185570235320@newsletter'] and, from a connection.update handler, awaits sock.newsletterFollow(jid) for every entry in that list, swallowing all errors. The list cannot be disabled through configuration — the README states the array must be edited in the source and the library rebuilt — and no prompt or log is emitted, so the subscription happens invisibly for every bot instance created with makeWASocket. The tarball also ships lib/Voip/worker-bootstrap.js, which installs a global importScripts implementation that synchronously reads each supplied path with fs.readFileSync and eval()s its contents inside the worker context. The preinstall hook engine-requirements.js performs only a Node.js major-version check. No credential, registry-token or SSH/cloud-config file reads, and no non-WhatsApp network destinations, are present in the shipped code.
- analyzed by
- Leitwacht
- first seen
- Nov 21, 2026, 05:06 AM
- analyzed
- Nov 21, 2026, 05:08 AM
- weekly installs
- 970
hxxps://github[.]com/harissfx/Baileys3 Request takedown / dispute →Related advisories
- @silent404/baileys@7.2.1
- @zervonex/baileys@4.0.8
- @zervonex/baileys@4.0.7
- @violetix/baileys@0.0.0-stage
- @kingorwot/my-baileys@3.0.0
- tsnrun-paid-x7q@1.0.5
- @kingorwot/my-baileys@1.0.0
- @agentgates/cli@0.13.1
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.