LWA-2026-14387 MAL-2026-20362 ↗ confirmed malware

@zervonex/baileys@4.0.8

Malicious code in @zervonex/baileys (npm)

T1195.002 · Compromise Software Supply ChainT1071.001 · Web ProtocolsT1105 · Ingress Tool TransferT1059.007 · JavaScriptT1027 · Obfuscated Files or InformationT1565 · Data Manipulation

Analysis

This package is an unofficial fork of the Baileys WhatsApp Web library, published under a scope other than the upstream @whiskeysockets/baileys, and it ships two behaviours that are not upstream. 1) Forced channel auto-follow. lib/Socket/newsletter.js hardcodes two WhatsApp channel JIDs, `120363422827915475@newsletter` and `120363409522637051@newsletter` (AUTO_FOLLOW_JIDS). On every `connection.update` event with `connection === 'open'` it waits 3 seconds, then calls the newsletter-join query (`xwa2_newsletter_join_v2`) for both channels on behalf of the connected account, and starts a 30-second interval that re-follows the same channels for as long as the socket stays open. lib/Defaults/index.js sets `autoFollowNewsletter: true` by default, so every consumer's WhatsApp account is enrolled as a follower of the author's channels unless they explicitly pass `autoFollowNewsletter: false`. Installing the library therefore mutates the operator's WhatsApp account state and inflates the author's channel subscriber counts. 2) Remote code delivery. WAProto/fetcher.js fetches `wa-version.json` and `WAProto.bundle.js` from `hxxps://raw[.]githubusercontent[.]com/nexustechpro2/baileys/wa-cache` (GITHUB_RAW const) on a 24-hour cache TTL and writes the bundle into the installed package directory (`WAProto/WAProto.bundle.tmp`, then `WAProto.proto`). WAProto/index.js runs `boot()` at import time; when the proto/table files are absent, invalid or fail to regenerate, it downloads that bundle, parses it with acorn (WAProto/parser.js), rewrites `WAProto.proto`, regenerates `WAProto.json` in a worker thread and hot-reloads it. What the library loads and executes on an already-installed machine is thus controlled by a git branch outside the published tarball, and changes there take effect on existing installs without a new npm version. The bundled preinstall hook (`engine-requirements.js`) only parses `process.versions.node` and exits below Node 20; it performs no network or shell activity. No credential, token, environment-variable or wallet exfiltration was found in the package, and no obfuscated string literals are shipped. IOCs: hxxps://raw.githubusercontent[.]com/nexustechpro2/baileys/wa-cache (files `wa-version.json`, `WAProto.bundle.js`); forced-follow channel JIDs `120363422827915475@newsletter` and `120363409522637051@newsletter`.

analyzed by
Leitwacht
first seen
Nov 20, 2026, 11:06 PM
analyzed
Nov 20, 2026, 11:07 PM
weekly installs
16,111
npm package ↗ OSV record MAL-2026-20362 ↗ source repo (declared, defanged): hxxps://github[.]com/nexustechpro2/baileys Request takedown / dispute →

Related advisories

browse all confirmed advisories →

Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.