reycode-baileys@2.0.2
Malicious code in reycode-baileys (npm)
Analysis
reycode-baileys@2.0.2 is a WhatsApp Multi-Device library that silently subscribes any account using it to hardcoded WhatsApp channels. In lib/Socket/newsletter.js the socket construction chain (lib/Socket/messages-send.js -> lib/Socket/username.js -> lib/Socket/newsletter.js) arms a setTimeout of 150000 ms; when it fires it loops over four hardcoded newsletter JIDs — 120363421096003443@newsletter, 120363416370859792@newaletter (note the misspelled suffix), 120363431275243639@newsletter and 120363412719371901@newsletter — and sends a w:mex FOLLOW query (query_id 7871414976211147) to each, spacing them 5 seconds apart. No option, configuration flag or user action gates the loop, and it runs on the normal message-send path, so every socket created with the library enrols the authenticated account in those channels. The package also resolves its Signal encryption layer from a third-party repository instead of the official library: dependencies.libsignal is pinned to github:tenka-san/libsignal-node at commit 105ad38dc8d7668b5d5e3688e710915bef5cdc7f, which npm fetches from codeload[.]github[.]com at install time, so the code handling the account's end-to-end key material comes from a non-official source. The preinstall hook engine-requirements.js only checks the Node.js major version. There is no C2 host, IP or credential-exfiltration endpoint in the package; the only network indicators are the WhatsApp channel JIDs above and the tenka-san/libsignal-node repository at that commit.
- analyzed by
- Leitwacht
- first seen
- Nov 27, 2026, 01:51 PM
- analyzed
- Nov 27, 2026, 01:53 PM
hxxps://github[.]com/reycode-lt/ReyCodeBaileys Request takedown / dispute →Related advisories
- reycode-baileys@2.0.3 same package
- reycode-baileys@2.0.1 same package
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.