@xz-bails/baileys@6.0.10
Malicious code in @xz-bails/baileys (npm)
Analysis
This package republishes the WhiskeySockets Baileys WhatsApp Web library under an unofficial scope using the canonical `baileys` name, with two behaviours that are not part of upstream. (1) lib/Socket/newsletter.js contains a hidden "XzV Newsletter Auto-Follow" routine: ten seconds after every connection opens it sends a WhatsApp `w:mex` FOLLOW query (query_id 7871414976211147) for the hardcoded channel JID 120363430764800148@newsletter, retrying up to three times at 20s intervals. The only opt-out is an undocumented `autoFollowNewsletters: false` socket config flag (or overriding `newsletterAutoFollowId`), so every bot built on this library silently enrols its WhatsApp account as a follower of the operator's channel. (2) package.json declares a runtime dependency on cache-manager ^7.2.8, satisfied by 7.2.10 — a version separately recorded as malicious — and an unpinned dependency on libsignal: github:tenka-san/libsignal-node, so installation pulls and runs third-party code fetched from a GitHub repository at install time. The declared preinstall hook (engine-requirements.js) only performs a Node.js >=20 version check. Operator contact/redirect: hxxps://t[.]me/XzRzSynxC.
- analyzed by
- Leitwacht
- first seen
- Nov 17, 2026, 10:08 AM
- analyzed
- Nov 17, 2026, 10:09 AM
Related advisories
- @xz-bails/baileys@6.0.11 same package
- @vinzzofficial/baileys@1.0.0
- @kropaku/baileys@6.7.22
- @jiancodes/baileys@2.0.3
- @rizzkezik/bails@6.1.2
- @kasabaileys/baileys@2.0.2
- @wanzforme/bails@7.0.0
- dapzsyz-baileysm@0.4.2
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.