@nakanoo/baileys@1.0.0
Malicious code in @nakanoo/baileys (npm)
Analysis
This package is a republished copy of the WhiskeySockets/Baileys WhatsApp library (v7.0.0-rc14, attributed in NOTICE.md) published under an unofficial scope, with hidden account-manipulation behaviour added at runtime. lib/custom.js defines customConfig with `pairingCode: 'RANDEV12'` and `autoFollow: true`; lib/Socket/index.js wraps makeWASocket and patches sock.requestPairingCode so that when a caller does not pass their own code, the fixed 8-character code RANDEV12 is used instead of a random one — anyone who knows the target phone number and this public code can enter it on their own device and link a companion device to the victim's WhatsApp account. The same wrapper subscribes to the socket's 'connection.update' event and, on first successful connection, calls autoFollowChannels(sock), which iterates two hardcoded WhatsApp channel JIDs — 120363424153860594@newsletter and 120363422841048901@newsletter — and calls sock.newsletterFollow() on each, so every program using this library silently enrols the operator's WhatsApp account into those channels. It also prints an ASCII banner crediting "RAN" and linking saweria[.]co/ranzdev. There is no install hook and no credential, token or file access; the impact is unauthorized device linking and forced channel subscriptions on the installing account.
- analyzed by
- Leitwacht
- first seen
- Nov 16, 2026, 11:32 PM
- analyzed
- Nov 16, 2026, 11:33 PM
hxxps://github[.]com/ranfemboy/Baileys Request takedown / dispute →Related advisories
- @nakanoo/baileys@1.0.1 same package
- nobiztoblut-bot@1.2.4
- @zeppeliorg/wbails@1.1.2
- @shurainc/baileys@3.0.2
- yuliawhh@2.0.0
- @kyuu2nd/baileys@2.0.0
- @devil-fight/baileys@1.0.5
- raiden-baileys@2.2.7
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.