{"id":"MAL-2026-20981","summary":"Malicious code in @chatbridge-it/baileys (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (45c21b3b72312e32146e385754ef078fbd242e4d6f00a9cfe8b81b564b8f095d)\nThe package manifest declares the runtime dependency `libsignal` as `github:chatunitycenter/libsignal-node` rather than a registry version range. `npm install` therefore fetches whatever that repository's default branch contains at install time, with no commit SHA pin, no version constraint and no integrity check, and runs any lifecycle scripts contained in that fetched source. Whoever controls that repository controls code that is installed and executed on the installer's machine, and the fetched content can change after this version was published. Separately, lib/Socket/socket.js contains a hardcoded newsletter identifier (120363418582531215@newsletter) and, on socket connection, follows/subscribes the authenticated user's WhatsApp account to that channel, persisting a flag in the stored auth credentials so it occurs once per account; this is an undisclosed action taken with the user's account identity, with no secrets read and no data sent to an author endpoint. lib/Utils/messages-media.js also exports an uploadFile() helper that posts caller-supplied buffers to hardcoded anonymous public file hosts (catbox.moe, scdn.pdi.moe, qu.ax, uguu.se, tmpfiles.org); this runs only when a caller explicitly invokes it with its own data.\n\n## Source: ghsa-malware (2923f5e4b20971515304a2a8b78ba4c6a0179fbc615fdb04c5f7b2910b168305)\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-2h7h-3rq9-2cvx"],"modified":"2026-12-03T19:45:06.161422783Z","published":"2026-12-02T14:27:43Z","database_specific":{"malicious-packages-origins":[{"id":"GHSA-2h7h-3rq9-2cvx","import_time":"2026-12-02T15:21:46.739508895Z","modified_time":"2026-12-02T14:27:43Z","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"sha256":"2923f5e4b20971515304a2a8b78ba4c6a0179fbc615fdb04c5f7b2910b168305","source":"ghsa-malware"},{"versions":["1.2.0"],"id":"IN-MAL-2026-023188","import_time":"2026-12-03T19:38:25.463895322Z","modified_time":"2026-12-03T19:13:25Z","sha256":"45c21b3b72312e32146e385754ef078fbd242e4d6f00a9cfe8b81b564b8f095d","source":"amazon-inspector"}]},"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-2h7h-3rq9-2cvx"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@chatbridge-it/baileys/v/1.2.0"}],"affected":[{"package":{"name":"@chatbridge-it/baileys","ecosystem":"npm","purl":"pkg:npm/%40chatbridge-it/baileys"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.2.0"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}],"indicators":{"evidence_files":[{"path":"package.json","sha256":"ce2a406d52cfce60be93eb5450eabf4845f2a13a37c9f30e75876e385185c176","tlsh":"1b51e211cc1cce6304c622fa697a0102557859679d95fc1c33985b6c4f5e2af3279f2e"},{"path":"lib/Socket/socket.js","sha256":"7506b88b729dec57e558b6d10d5afe43157641626597fa6d19365c1cf987a9be","tlsh":"c233c86b49b5153a8b7373759b277421f221e227224082a77fbc82211fb61d8d693fcd"},{"tlsh":"e0f2e96e1db96436437273f4db239629f66b912f32408266bf5c86001fb2414d6f2fe9","path":"lib/Utils/messages-media.js","sha256":"3a02f9edb4543257ad3c359426e45aef4cf0cc5474f1f991fab0eb8db1640b12"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@chatbridge-it/baileys/MAL-2026-20981.json"}}],"schema_version":"1.9.2","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}