Malicious code in @alannxds/baileys (npm)
- MAL-2026-18669
Description
@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.
Text from the OSV record.
Recommendation
Remove the package and rotate any secret the machine that installed it could reach. There is no version to update to.
Affected
@alannxds/baileysnpm
No versions listed
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.