@zervonex/baileys@3.0.9
Malicious code in @zervonex/baileys (npm)
Analysis
This package is an unofficial fork of the @whiskeysockets/baileys WhatsApp library published under the @zervonex scope. It carries two behaviours beyond upstream, both active without operator action: 1. Forced channel enrolment. lib/Socket/newsletter.js hardcodes two WhatsApp newsletter JIDs (120363422827915475@newsletter and 120363409522637051@newsletter). On every socket 'open' event it issues the newsletter join query for both on behalf of the linked WhatsApp account, then sets ADMIN_NOTIFICATIONS to false for each channel, and repeats the follow every 30 seconds for the life of the session. lib/Defaults/index.js enables this by default (autoFollowNewsletter: true), so it runs unless the integrator explicitly sets autoFollowNewsletter: false. 2. Author-controlled remote code/definition updates into installed files. WAProto/fetcher.js fetches wa-version.json and WAProto.bundle.js every 24 hours from hxxps://raw[.]githubusercontent[.]com/nexustechpro2/baileys/wa-cache, a branch controlled by the package author, staging the bundle as WAProto.bundle.tmp. WAProto/index.js then reads that downloaded file, runs it through the acorn/acorn-walk parser in WAProto/parser.js, and writes the resulting output over WAProto/WAProto.proto and WAProto/WAProto.json inside the installed package directory (tmp file + rename). The content that is parsed and persisted is whatever is on that branch at fetch time, outside npm's integrity check. The package also declares dependencies on @cacheable/node-cache (^3.1.1) and cache-manager (^7.2.9), which resolve to versions that are themselves malicious packages, adding a second execution path for every project that installs it. Indicators: hxxps://raw.githubusercontent[.]com/nexustechpro2/baileys/wa-cache (files wa-version.json, WAProto.bundle.js); WhatsApp channel JIDs 120363422827915475@newsletter and 120363409522637051@newsletter; staging file WAProto/WAProto.bundle.tmp.
- analyzed by
- Leitwacht
- first seen
- Nov 4, 2026, 11:15 AM
- analyzed
- Nov 4, 2026, 11:36 AM
- weekly installs
- 16,111
Related advisories
- @zervonex/baileys@4.0.3 same package
- @zervonex/baileys@4.0.2 same package
- @zervonex/baileys@4.0.1 same package
- @zervonex/baileys@4.0.0 same package
- @zervonex/baileys@3.0.6 same package
- @zervonex/baileys@3.0.5 same package
- raiden-baileys@2.1.7
- sauruspro-bail@5.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.