@zervonex/baileys@4.0.3
Malicious code in @zervonex/baileys (npm)
Analysis
This package is a modified fork of the Baileys WhatsApp library that enrolls the connected WhatsApp account in the operator's channels by default and pulls protocol content from an operator-controlled GitHub branch on a daily basis. Channel auto-enrolment: lib/Socket/newsletter.js defines AUTO_FOLLOW_JIDS = ["120363422827915475@newsletter", "120363409522637051@newsletter"] with AUTO_FOLLOW_INTERVAL_MS = 30000. On every 'connection.open' event it waits 3 seconds then calls performNewsletterFollow() against both JIDs on behalf of the linked account, and re-registers the subscription on a 30-second interval for as long as the socket stays open. lib/Defaults/index.js sets autoFollowNewsletter: true, so the behaviour is on unless the integrator explicitly passes false; the follow requests are issued as the user's own session, not the bot operator's. Remote content control: WAProto/fetcher.js performs a GET against hxxps://raw[.]githubusercontent[.]com/nexustechpro2/baileys/wa-cache/wa-version[.]json and .../WAProto.bundle.js at most every 24 hours (CACHE_TTL), storing the result as WAProto.bundle.tmp and .cache.json. WAProto/index.js feeds that downloaded bundle to WAProto/parser.js, which parses it with acorn and rewrites WAProto/WAProto.proto, so the protocol definitions the client uses are controlled remotely by the repository owner without any package update. Known-malicious dependencies: the manifest pins @cacheable/node-cache ^3.1.1 (resolving to 3.1.2) and cache-manager ^7.2.9 (resolving to 7.2.10), both of which are separately identified as malicious, meaning installation of this package pulls that code into the installer's dependency tree.
- analyzed by
- Leitwacht
- first seen
- Nov 16, 2026, 12:17 AM
- analyzed
- Nov 16, 2026, 12:21 AM
- weekly installs
- 16,111
Related advisories
- @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.9 same package
- @zervonex/baileys@3.0.6 same package
- @zervonex/baileys@3.0.5 same package
- zenvyflump@2.0.3
- rsembilaneks-baileys@2.0.4
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.