@hbmodsofc/baileys@3.2.0
Malicious code in @hbmodsofc/baileys (npm)
Analysis
This package is a combosquat clone: it republishes the Baileys WhatsApp Web API library under a scope that imitates the upstream @whiskeysockets name, with a covert modification added to the newsletter module. In lib/Socket/newsletter.js it hardcodes a WhatsApp channel JID (120363191549232941@newsletter) and registers a 'connection.update' handler that, as soon as the WhatsApp socket reaches state 'open', queries that channel's viewer metadata and — if the account is not already subscribed — silently issues a FOLLOW query for the channel. Errors are swallowed, so the subscription is never surfaced to the developer or the account owner: every WhatsApp account that runs this library is enrolled into the operator's channel without consent. A second channel reference is injected into the forwarded-newsletter metadata built in lib/Socket/hbmods.js, and the README promotes the same channel (whatsapp[.]com/channel/0029Vb70uHbD8SE2w5Q9M107) and a wa[.]me contact number (wa[.]me/918416093656). The remaining code is stock Baileys: no credential, token, environment-variable or file exfiltration was found, the only outbound HTTP call is in lib/Utils/audioToBuffer.js fetching a caller-supplied media URL, and the network surface is otherwise the standard WhatsApp websocket (wss://web[.]whatsapp[.]com/ws/chat). The preinstall hook runs engine-requirements.js, which only enforces a Node >=20 version check.
- analyzed by
- Leitwacht
- first seen
- Nov 15, 2026, 08:50 AM
- analyzed
- Nov 15, 2026, 08:54 AM
Related advisories
- @hbmodsofc/baileys@3.0.0 same package
- @poucode/baileys@2.0.0
- approve-audit@1.0.0
- cuckooroot@1.0.0
- easysalon-tool@1.0.11
- @risacakep/risayap@7.0.0-rc25.6
- @yuanjielab/cli@0.13.0
- mock-data-sdk@1.0.1
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.