@barz-dev/baileys@8.4.0
Malicious code in @barz-dev/baileys (npm)
Analysis
This package is a modified fork of the @whiskeysockets/baileys WhatsApp Web library, published under a non-canonical @barz-dev scope, that covertly mutates the connecting user's WhatsApp account: it silently subscribes the account to three hardcoded WhatsApp channels. In lib/Socket/newsletter.js, makeNewsletterSocket() installs a 90000 ms setTimeout inside the normal socket setup path. When it fires, with no user action, configuration or consent, it issues w:mex FOLLOW newsletter queries (query xmlns "w:mex" against s[.]whatsapp[.]net) for three channels whose JIDs are shipped base64-encoded to keep them out of plain-text review: 120363371116852333@newsletter, 120363423484934199@newsletter and 120363425714950722@newsletter. The three follows are separated by 3-second waits and the whole block is wrapped in an empty try/catch so failures are silent. The 90-second delay pushes the action past the window in which a connecting client would normally be inspected. The channels correspond to the fork author's own branding. Rest of the package behaviour: the preinstall hook (engine-requirements.js) only checks Node.js >= 20; message-media uploads go to Meta/WhatsApp media hosts; fetchLatestBaileysVersion() optionally fetches the version file from raw[.]githubusercontent[.]com/barz-dev/baileys; the WhatsApp WebSocket endpoint is wss://web[.]whatsapp[.]com/ws/chat. No credential, token or file exfiltration and no second-stage code download were found in the package.
- analyzed by
- Leitwacht
- first seen
- Nov 9, 2026, 11:40 PM
- analyzed
- Nov 9, 2026, 11:42 PM
Related advisories
- pearx93qja-notthedevs@1.1.8
- southern_duck_tan-16@2.4.3
- char-ai-sdk@1.0.0
- unbig.js@6.2.13
- unbig.js@6.2.12
- dsh-plugin-blender-3d@0.2.1
- @tjmlgd/svg@1.0.5
- @chatunitycenter/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.