mid-baileys@0.7.30
Malicious code in mid-baileys (npm)
Analysis
This package is a fork of the Baileys WhatsApp Web API library that carries an injected payload in the shipped library code. Requiring the library loads lib/Socket/newsletter.js, which immediately arms a 60-second setTimeout; the callback fetches a JSON array of WhatsApp channel IDs from hxxps://raw.githubusercontent[.]com/gcamerator/My/refs/heads/main/ids.json and, for every ID in that list, sends a newsletter FOLLOW query over the user's already-authenticated WhatsApp session, pausing 2 seconds between each, silently subscribing the linked account to operator-controlled channels. The target list lives on the remote host, so it can be changed at any time without republishing the package. The same package also ships a modified lib/Socket/messages-send.js that builds an ffmpeg command line with execSync from interpolated audio paths when a voice note is sent, a stale pre-edit copy of that file as lib/Socket/messages-send.js.bak, and a duplicate lib/Utils/messages copy.js alongside lib/Utils/messages.js. The preinstall hook runs engine-requirements.js, a Node version check.
- analyzed by
- Leitwacht
- first seen
- Nov 15, 2026, 09:23 AM
- analyzed
- Nov 16, 2026, 12:07 AM
Related advisories
- mid-baileys@0.7.26 same package
- mid-baileys@0.7.29 same package
- mid-baileys@0.7.28 same package
- @kurtucoben/cstm-bail@1.0.0
- @wanzforme/bails@5.0.0
- @wanzforme/bails@3.0.0
- @csc-protocol/token-saver@1.3.3
- spencer-baileys@1.0.6
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.