nakano-baileys@1.0.9
Malicious code in nakano-baileys (npm)
Analysis
nakano-baileys, a fork of the Baileys WhatsApp Web API library, hijacks the connection lifecycle of every app that uses it. lib/custom.js hardcodes autoFollow: true, a fixed pairing code 'NAKANOCJ' and three WhatsApp channel JIDs (120363413531701847@newsletter, 120363431680006732@newsletter, 120363412274875891@newsletter). lib/Socket/index.js calls showBanner() inside makeWASocket() and registers a 'connection.update' listener that, on the first connection with connection === 'open', invokes autoFollowChannels(sock), which calls sock.newsletterFollow() for each of the three JIDs. The same wrapper replaces sock.requestPairingCode so that when the application passes no custom code the library substitutes its own fixed 'NAKANOCJ', overriding the device-pairing credential chosen by the user. The net effect is that every WhatsApp account linked through this package is silently enrolled as a follower of the maintainer's channels under a predictable pairing code, with no configuration switch exposed to the calling application. The package also ships a preinstall hook (engine-requirements.js) that only checks for Node.js 20+. Its only network destinations in code are web[.]whatsapp[.]com / call[.]whatsapp[.]com (including hxxps://web[.]whatsapp[.]com/sw[.]js) and the upstream version file at raw[.]githubusercontent[.]com.
- analyzed by
- Leitwacht
- first seen
- Nov 25, 2026, 11:06 PM
- analyzed
- Nov 25, 2026, 11:08 PM
hxxps://github[.]com/nakano-cjs/baileys Request takedown / dispute →Related advisories
- nakano-baileys@1.1.0 same package
- nakano-baileys@1.0.8 same package
- nakano-baileys@1.0.7 same package
- nakano-baileys@1.0.6 same package
- ceaser-baileys@3.4.15
- @silent404/baileys@7.2.2
- omhcmbud-bails@7.0.6
- @zeppeliorg/wbails@1.1.5
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.