{"id":"MAL-2026-16104","summary":"Malicious code in @nexustechpro/baileys (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (77e10f9b682c7a34a63468b31a47d982a98bf6d0308b5dbe96b0df7bdb51fdd6)\n@nexustechpro/baileys is a fork of the Baileys WhatsApp library in which lib/Socket/chats.js (~270 KB) is transformed with obfuscator.io (large string-array with rotate loop, decoder wrapper, hex-escaped identifiers) while every other module under lib/Socket/ is plain, readable code matching upstream. The obfuscated module is re-exported from lib/Socket/index.js and therefore loads on every require() of the package, executing inside a socket chain that has access to the authenticated WhatsApp session credentials, contact list, and message stream. In addition, on every 'connection.update' where connection==='open', the package silently subscribes the installer's authenticated WhatsApp account to a hardcoded newsletter JID (120363422827915475@newsletter) and re-applies the subscription every 30 seconds via setInterval; an AUTO_FOLLOW_FORCE_MODE flag bypasses the already-following check so a user-initiated unfollow is undone. There is no configuration surface, opt-out, or documentation for this behavior. package.json also declares an unpinned first-party-sounding dependency 'whatsapp-rust-bridge: latest'. The package name and keywords mirror the upstream @whiskeysockets/baileys ecosystem.\n\n## Source: ghsa-malware (540ddb6572705d776d96d9199b385b55b45093ea3f9da298751ae13c289d924d)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n","aliases":["GHSA-8w6v-4xp9-rvrr"],"modified":"2026-10-13T07:45:14.761890745Z","published":"2026-09-09T22:27:09Z","database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","versions":["2.2.7"],"id":"IN-MAL-2026-019904","import_time":"2026-09-09T22:38:09.680342884Z","modified_time":"2026-09-09T22:27:09Z","sha256":"fed8b2b0be012012aa9b1716e58c6d9e9a7302e431d5f8945e7b1196b6d7afab"},{"id":"GHSA-8w6v-4xp9-rvrr","import_time":"2026-10-12T16:30:26.940867369Z","modified_time":"2026-10-12T15:32:23Z","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"sha256":"540ddb6572705d776d96d9199b385b55b45093ea3f9da298751ae13c289d924d","source":"ghsa-malware"},{"versions":["2.2.5"],"id":"IN-MAL-2026-021466","import_time":"2026-10-13T07:32:01.557245622Z","modified_time":"2026-10-13T06:54:14Z","sha256":"77e10f9b682c7a34a63468b31a47d982a98bf6d0308b5dbe96b0df7bdb51fdd6","source":"amazon-inspector"},{"import_time":"2026-10-13T07:32:01.5870231Z","modified_time":"2026-10-13T06:54:24Z","sha256":"f36bbd92f268ccdeec610b1494add9a0bda52f78162c47d0666cc6aa12dcdad2","source":"amazon-inspector","versions":["2.2.4"],"id":"IN-MAL-2026-021467"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@nexustechpro/baileys/v/2.2.7"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-8w6v-4xp9-rvrr"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@nexustechpro/baileys/v/2.2.5"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@nexustechpro/baileys/v/2.2.4"}],"affected":[{"package":{"name":"@nexustechpro/baileys","ecosystem":"npm","purl":"pkg:npm/%40nexustechpro/baileys"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["2.2.7","2.2.5","2.2.4"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@nexustechpro/baileys/MAL-2026-16104.json","cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"sha256":"06dca1b96cbc00d05c321eb5a5a1647ad5a79c9c9f04e119d1319237c7caf049","tlsh":"6d4464d04fd1a01361ce96afbf156ea8732bd352ea84b14761d77ac824eda43c360de1","path":"lib/Socket/chats.js"},{"tlsh":"d9c11037ce88ce6306b173d9a5b50242f4580b4f1a90cc4f717d5bac8fb39072195b69","path":"package.json","sha256":"b3348d098797d2eac851786dd728164056ac5e9ccf869c289023b342fb11c2d8"}],"package_integrity":[{"filename":"baileys-2.2.7.tgz","hashes":{"sha1":"6b1725bcc55dc1b831e3655803c37726c2599497","sha512_sri":"sha512-awsZivZPtxV82WwuKFEY6VMLnDoISVChsaW4xQNyEKokWOi0deeIB4I3f199xHPUiDwDhTKj6pvfG/hC3655Ew=="}}]}}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}