MAL-2026-18669
Malicious code in @alannxds/baileys (npm)
Impact
@alannxds/baileys is a fork of the Baileys WhatsApp Web library that silently subscribes the installer's own WhatsApp account to WhatsApp Channels chosen by the publisher. When the socket connects, code in lib/Socket/newsletter.js sends the WhatsApp w:mex FOLLOW query for the channel ID(s) 120363371199176376@newsletter, 120363387182851100@newsletter, 120363421367985094@newsletter (stored base64-encoded), using the victim's authenticated session and without telling them. Same behaviour as the PhantomSub family (MAL-2026-17342). This package is a fork of the Baileys WhatsApp library published under the @alannxds scope. Its package.json declares its core cryptographic dependency `libsignal` as `github:alannzxd/libsignal-node`, an unpinned git reference pointing at a personal GitHub account's default branch with no commit SHA and no integrity check. On `npm install`, npm resolves whatever bytes that repository's HEAD currently returns and executes any lifecycle scripts inside it; whoever controls that repository can change the installed code at any time. The fork is hosted under a personal account divergent from the upstream WhiskeySockets/libsignal-node project. Additionally, lib/index.js performs a top-level fetch to `https://raw.githubusercontent.com/alannzxd/xclient/refs/heads/main/information.json` on every import, a mutable author-controlled URL; the current response is only logged, but the same channel can serve arbitrary future content.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| npm | @alannxds/baileys | unknown | none recorded |
Weakness classification
References
- https://osv.dev/vulnerability/MAL-2026-18669
- https://www.npmjs.com/package/@alannxds/baileys
- https://www.ox.security/blog/phantomsub-malicious-npm-campaign-secretly-adds-users-to-whatsapp-spam-channels/
- https://www.npmjs.com/package/@alannxds/baileys/v/6.2.12
- https://www.npmjs.com/package/@alannxds/baileys/v/6.2.13