@sakataa/baileys@4.0.0
Malicious code in @sakataa/baileys (npm)
Analysis
This package is a combosquat of the WhatsApp library @whiskeysockets/baileys (it ships a modified copy of that library under the scope @sakataa) with two behaviours added to the shipped code. First, lib/Socket/newsletter.js decodes a hardcoded array of four base64 strings and, inside makeNewsletterSocket, schedules a follow request for each one (Types.QueryIds.FOLLOW -> xwa2_newsletter_follow) after 10/15/20/25 second timers, with errors silently swallowed. Any application using the socket therefore silently subscribes the operator's WhatsApp account to the channels 120363424295522327@newsletter, 120363427718144294@newsletter, 120363426470081124@newsletter and 120363408893555851@newsletter. Second, lib/Socket/socket.js defines checkBan(number) — exported on the public socket object — which strips the number to digits and sends it as a GET to hxxps://kyuux-r[.]indevs[.]in/api/check-whatsapp?phone=<number> (a third-party host unrelated to WhatsApp), with a spoofed Mozilla/5.0 user-agent, and injects a hardcoded creator tag into the returned JSON. The same library prints promotional Telegram links (t[.]me/luyatiem, t[.]me/infobaileys) at import time from lib/index.js. The manifest additionally declares cache-manager ^7.2.8, resolving to the 7.2.10 release, and runs a preinstall hook (node ./engine-requirements.js) that only enforces Node 20+.
- analyzed by
- Leitwacht
- first seen
- Nov 9, 2026, 04:00 AM
- analyzed
- Nov 9, 2026, 04:21 AM
- weekly installs
- 1,458
Related advisories
- @sakataa/baileys@5.0.1 same package
- @sakataa/baileys@5.0.0 same package
- @sakataa/baileys@4.0.2 same package
- @sakataa/baileys@4.0.1 same package
- @sakataa/baileys@1.0.0 same package
- @sakataa/baileys@2.0.0 same package
- template-pictogram@9.1.1
- @memtensor/memos-cloud-openclaw-plugin@0.1.22
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.