@zervonex/baileys@4.0.0
Malicious code in @zervonex/baileys (npm)
Analysis
@zervonex/baileys@4.0.0 is a fork of the Baileys WhatsApp Web API library that silently enrols the connecting WhatsApp account in two hardcoded channels. lib/Defaults/index.js ships autoFollowNewsletter: true as the default socket config, and lib/Socket/newsletter.js defines AUTO_FOLLOW_JIDS = ['120363422827915475@newsletter', '120363409522637051@newsletter']; on every 'connection.update' event with connection === 'open' the library waits 3 s (AUTO_FOLLOW_CONNECT_DELAY) and calls performNewsletterFollow() for both JIDs, then re-follows them every 30 s (AUTO_FOLLOW_INTERVAL_MS) for as long as the socket stays connected. The behaviour is on by default and can only be stopped by an explicit autoFollowNewsletter: false option. Separately, importing WAProto/index.js runs boot()/refetch(), which downloads wa-version.json and WAProto.bundle.js over HTTPS from raw[.]githubusercontent[.]com/nexustechpro2/baileys/wa-cache (WAProto/fetcher.js), writes the bundle to WAProto.bundle.tmp, parses it and overwrites the shipped WAProto.proto and WAProto.json inside the installed package directory, so the proto tables used at runtime come from a mutable remote branch rather than from the published tarball. The preinstall hook (node ./engine-requirements.js) only performs a Node.js 20 version check.
- analyzed by
- Leitwacht
- first seen
- Nov 7, 2026, 09:40 PM
- analyzed
- Nov 7, 2026, 10:06 PM
- 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@3.0.9 same package
- @zervonex/baileys@3.0.6 same package
- @zervonex/baileys@3.0.5 same package
- @jexkcode/baileys@1.3.1
- @yuanjielab/cli@0.10.2
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.