@zervonex/baileys@4.0.7
Malicious code in @zervonex/baileys (npm)
Analysis
This package is a re-scoped fork of @whiskeysockets/baileys that advertises itself as a drop-in replacement and adds behaviour the original does not have. On every successful WhatsApp socket connection, lib/Socket/newsletter.js issues the newsletter join query (XWAPaths.xwa2_newsletter_join_v2) for two hardcoded channels, 120363422827915475@newsletter and 120363409522637051@newsletter, then disables admin notifications for them, and repeats both joins on a 30-second interval for the lifetime of the connection. The switch autoFollowNewsletter defaults to true in lib/Defaults/index.js, so any application that adopts this package silently enrols its users' accounts into those channels. Separately, WAProto/fetcher.js downloads wa-version.json and WAProto.bundle.js from hxxps://raw.githubusercontent[.]com/nexustechpro2/baileys/wa-cache every 24 hours into the installed package directory (cache file WAProto/.cache.json, temp file WAProto/WAProto.bundle.tmp) and feeds the bundle to the bundled acorn-based parser at WAProto/parser.js, which rewrites WAProto.proto and rebuilds the codec used for all messaging. The sha256 taken in fetcher.js is only compared against the previous local cache value to detect change — it is never checked against a pinned or signed expected digest, and the fetched branch is mutable and controlled by the package's own repository owner, so content served from it is compiled and applied inside every install without integrity verification. The declared dependency ranges also resolve to versions of @cacheable/node-cache and cache-manager that carry known-malicious payloads. The preinstall hook engine-requirements.js only checks that Node.js is version 20 or newer.
- analyzed by
- Leitwacht
- first seen
- Nov 20, 2026, 10:36 PM
- analyzed
- Nov 20, 2026, 10:37 PM
- weekly installs
- 16,111
hxxps://github[.]com/nexustechpro2/baileys Request takedown / dispute →Related advisories
- @zervonex/baileys@4.0.9-patch.1 same package
- @zervonex/baileys@4.0.9 same package
- @zervonex/baileys@4.0.8 same package
- @zervonex/baileys@4.0.6-final same package
- @zervonex/baileys@4.0.5-final same package
- @zervonex/baileys@4.0.4-final same package
- @zervonex/baileys@4.0.4 same package
- @kurtucoben/cstm-bail@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.