LWA-2026-13940 confirmed malware

@zervonex/baileys@4.0.1

Malicious code in @zervonex/baileys (npm)

T1195.002 · Compromise Software Supply ChainT1105 · Ingress Tool TransferT1071.001 · Web ProtocolsT1090 · Proxy

Analysis

@zervonex/baileys is an unofficial fork of the WhiskeySockets Baileys WhatsApp Web library that behaves on the connected user's account and ships a publisher-controlled remote-code channel. 1) Account manipulation on every connection. lib/Socket/newsletter.js hardcodes AUTO_FOLLOW_JIDS = ['120363422827915475@newsletter', '120363409522637051@newsletter'] and AUTO_FOLLOW_INTERVAL_MS = 30_000. performNewsletterFollow() issues a FOLLOW request (QueryIds.FOLLOW, xwa2_newsletter_join_v2) for each of those Zervonex channels on the `connection.update` event when connection === 'open', then calls newsletterUserSetting(jid, 'ADMIN_NOTIFICATIONS', false) to mute admin notifications for the channel, and re-runs the follow loop every 30 seconds for as long as the socket stays open. The enrolment is on by default; the only escape is setting `autoFollowNewsletter: false` in the socket config. Every bot built on the fork therefore silently subscribes its phone number to the publisher's channels, inflating follower counts on attacker-chosen WhatsApp channels with victim accounts. 2) Mutable remote payload compiled at runtime. WAProto/fetcher.js downloads hxxps://raw[.]githubusercontent[.]com/nexustechpro2/baileys/wa-cache/wa-version[.]json and WAProto.bundle.js (a git branch, not a pinned commit) over undici with a 24-hour cache, writing the bundle to WAProto/WAProto.bundle.tmp. WAProto/index.js then reads that downloaded bundle and passes it through WAProto/parser.js (acorn/acorn-walk AST extraction) to regenerate WAProto.proto and WAProto.json, which change the codec the library uses to parse and build WhatsApp traffic. Only a self-computed sha256 of the same download is compared against the previous fetch, so whoever controls that branch can push different bundle source into every installation within 24 hours, with no signature, no version pin and no verification against the npm package. The install hook (preinstall → engine-requirements.js) only checks the Node.js major version and performs no network activity.

analyzed by
Leitwacht
first seen
Nov 12, 2026, 01:29 PM
analyzed
Nov 12, 2026, 02:06 PM
weekly installs
16,111

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.