{"id":"MAL-2026-21036","summary":"Malicious code in nakano-baileys (npm)","details":"nakano-baileys is a modified copy of the Baileys WhatsApp Web library (@whiskeysockets/baileys) that subscribes the user's WhatsApp account to three channels chosen by its author. When an application that imports it creates a socket with `makeWASocket` and the connection first opens, `lib/Socket/index.js` calls `autoFollowChannels` from `lib/custom.js`, which sends `newsletterFollow` on the user's authenticated session for 120363413531701847@newsletter, 120363431680006732@newsletter and 120363412274875891@newsletter, with `autoFollow: true` as the default. Earlier versions documented this and an opt-out in the README; from 1.0.8 the README no longer mentions it, while the code is unchanged. Versions 1.0.3 to 1.0.5 followed 120363424153860594@newsletter instead, the channel that @randev404/baileys (MAL-2026-18878) also follows from its `lib/custom.js`.","modified":"2026-12-03T08:15:06.804949303Z","published":"2026-11-25T22:26:51Z","database_specific":{"iocs":{"files":[{"paths":["lib/custom.js"],"source":"PACKAGE_ARCHIVE","digests":{"sha256":"4756c8987cb3ebf7a452015a988361156da0216e3832eaf8829113beb0a8cc8c"},"note":"1.0.8-1.1.5: customConfig autoFollow: true with 3 hardcoded newsletter IDs; autoFollowChannels() follows each."},{"note":"1.0.8-1.1.3: calls autoFollowChannels(sock) on the first connection open.","paths":["lib/Socket/index.js"],"source":"PACKAGE_ARCHIVE","digests":{"sha256":"bcdec9095c3ccbeef92e9fa9e37ada65a835a07bdd97cebdfab531f13b9040bd"}},{"paths":["lib/Socket/index.js"],"source":"PACKAGE_ARCHIVE","digests":{"sha256":"b28bf939aaf488df745803ed39448b50e6f7078f72908ffee733a23dc5e3403a"},"note":"1.1.4-1.1.5: calls autoFollowChannels(sock) on the first connection open."}]}},"affected":[{"package":{"name":"nakano-baileys","ecosystem":"npm","purl":"pkg:npm/nakano-baileys"},"versions":["1.0.8","1.0.9","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5"],"database_specific":{"cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}],"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/nakano-baileys/MAL-2026-21036.json"}}],"schema_version":"1.9.2","credits":[{"name":"InvisiRisk, Inc.","contact":["https://www.invisirisk.com","mailto:research@invisirisk.com"],"type":"FINDER"}]}