nakano-baileys@1.0.5
Malicious code in nakano-baileys (npm)
Analysis
This package is a fork of the Baileys WhatsApp Web API library that silently enrols the installing user's WhatsApp account into channels chosen by the package author. lib/Socket/index.js hooks the socket 'connection.update' event and, the first time the connection reaches the 'open' state, calls autoFollowChannels(sock); lib/custom.js ships two hardcoded newsletter IDs (120363424153860594@newsletter and 120363422841048901@newsletter) with the autoFollow flag enabled by default, and the routine calls sock.newsletterFollow() for each one with the user's authenticated session, two seconds apart, swallowing all errors. The same file overrides sock.requestPairingCode so that any caller-supplied pairing code is replaced with the fixed literal 'NAKANOCJ', and prints a coloured 'NAKANO BAILEYS' banner on first socket creation. The subscription is opt-out only (customConfig.autoFollow = false before use) and is unrelated to the library's documented API surface. Beyond this account-side manipulation, the shipped code contains no credential, token or environment exfiltration, no callback or webhook host, and no obfuscated or dynamically-decoded payload: the only environment variable read is BAILEYS_LOG_LEVEL, the preinstall hook is a Node.js >= 20 version check, and outbound traffic is the ordinary web[.]whatsapp[.]com client protocol. IOCs: WhatsApp newsletter JIDs 120363424153860594@newsletter and 120363422841048901@newsletter; fixed pairing code NAKANOCJ; project repository github[.]com/nakano-cjs/baileys.
- analyzed by
- Leitwacht
- first seen
- Nov 14, 2026, 11:35 AM
- analyzed
- Nov 15, 2026, 11:02 PM
Related advisories
- @csc-protocol/token-saver@1.3.3
- @dinzid/bailstaov1@0.1.0
- approve-audit@1.0.0
- @csc-protocol/token-saver@1.3.2
- @charape/baileys@1.0.7
- sauruspro-bail@5.0.2
- @memtensor/memos-cloud-openclaw-plugin@0.1.22
- fmode-image@0.1.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.