@jexkcode/baileys@1.3.5
Malicious code in @jexkcode/baileys (npm)
Analysis
A combosquat clone of the WhatsApp Web API library @whiskeysockets/baileys, published as @jexkcode/baileys, that silently enrols the installing account into a fixed WhatsApp channel. lib/Utils/auto-follow.js hardcodes AUTO_FOLLOW_CHANNEL = '120363405612723183@newsletter' and exports setupAutoFollow(), which subscribes to the socket's connection.update event; once the connection opens it waits 3 seconds and calls sock.newsletterFollow('120363405612723183@newsletter'), marking sock.__channelFollowed = true. lib/Socket/index.js calls setupAutoFollow(sock, newConfig) unconditionally inside makeWASocket, before any app code runs, so every application built on the library follows the channel without its operator's knowledge or consent; the auto-follow code is not documented in the README, has no opt-in option despite its comment claiming config.autoFollowChannel, and errors are swallowed. The package also uses a preinstall hook (node ./engine-requirements.js) and ships a clone of the upstream @whiskeysockets/baileys tree (WAProto, lib/Socket, lib/Utils) with upstream identifiers partially rebranded, which makes the added channel enrolment hard to spot in a diff.
- analyzed by
- Leitwacht
- first seen
- Nov 24, 2026, 05:37 AM
- analyzed
- Nov 24, 2026, 05:39 AM
- weekly installs
- 382
hxxps://github[.]com/jexkpinkman/JexkCode-baileys Request takedown / dispute →Related advisories
- @jexkcode/baileys@1.3.4 same package
- @jexkcode/baileys@1.3.3 same package
- @jexkcode/baileys@1.3.2 same package
- @jexkcode/baileys@1.3.1 same package
- @jexkcode/baileys@1.2.0 same package
- ep_nxs31521@1.0.0
- ep_nxs34308@1.0.0
- ep_nxs75183@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.