{"schema_version":"1.9.0","id":"MAL-2026-4519","published":"2026-05-25T14:50:39Z","modified":"2026-09-30T10:32:25.475695302Z","withdrawn":"2026-05-26T22:13:04Z","summary":"Malicious code in chromestaff-baileys (npm)","details":"This package is part of a large family (100+ identified as of September 2026) of near-identical\nforks of the Baileys WhatsApp Web library that inject a covert channel-subscription action into\nthe WhatsApp socket layer. On connect, the injected code issues an authenticated `w:mex` FOLLOW\nquery (query_id 7871414976211147) against one or more attacker-chosen WhatsApp Channel/Newsletter\nJIDs, using the installer's own authenticated WhatsApp session -- silently subscribing the\nvictim's account to channels it never asked to join.\n\nThe target JID(s) are hidden from casual source review via one of several obfuscation techniques\nobserved across the family: a plain string literal, base64 encoding, base64+XOR, or a char-code\narray reconstructed at runtime. Some variants instead fetch a mutable, attacker-controlled remote\nJSON/JS list of target JIDs from GitHub or another host at runtime, letting the target list change\nafter installation without a new npm publish. Every sample in the family shares the same underlying\nmechanism (a wrapped/patched socket-connect routine that fires the FOLLOW query some seconds after\nconnect), even though the package name, JID value(s), and obfuscation/delivery method differ per\nfork.\n\nThe malicious action abuses the installer's own authenticated WhatsApp session to gain reach and\nsubscribers for attacker-controlled channels; it does not exfiltrate credentials, establish\npersistence, or execute arbitrary remote code.\n\nAffected package: chromestaff-baileys (npm), version(s): 1.2.7.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (4d5fad12014025f37f607a61051a445262f37bcee6682850dfd77cc0dcb0b486)\nchromestaff-baileys is a fork of the Baileys WhatsApp library that, on every successful WhatsApp connection, silently forces the connected user's WhatsApp account to follow a hardcoded author-controlled newsletter (`120363418582531215@newsletter`). In `lib/Socket/socket.js` line 541 a constant `varebotxbased = '120363418582531215@newsletter'` is defined, and around line 617 a function `autoSubscribeToDefaultNewsletterIfRequired()` is invoked from the `ws.on('CB:success',...)` handler, calling `followNewsletterWMex(varebotxbased, timeoutMs)`. The action is undocumented, gated by a `creds.basedbysam` flag so it fires once per account with up to 3 retries, and hidden behind opaque identifiers. Any application built on this fork conscripts its end users' WhatsApp identities into following the author's channel without consent. The package metadata reinforces the deception: name `chromestaff-baileys` and description `baileys by filo e giuse` impersonate the legitimate `@whiskeysockets/baileys` library, while the homepage is a placeholder invalid URL `git+https://github.com/precisione.git`. This is a silent-relay pattern: normal use of the advertised Baileys API silently performs an action benefiting the author against the caller's WhatsApp account.\n","affected":[{"package":{"name":"chromestaff-baileys","ecosystem":"npm","purl":"pkg:npm/chromestaff-baileys"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.1.3","1.2.7"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"lib/Socket/socket.js","sha256":"6739902383bca8b02754a38c306dd48b81b6b67fde04754232b356dd7c6f328e","tlsh":"3d23516b45f714365773b079472ba0616231e0073948eda67f8c82219f892acdaf37de"},{"path":"package.json","sha256":"06360122ec5ad3754a07eaf7cdfa9be9a2b60d31674defb9d556f3b913dca0c8","tlsh":"5e51ce33ca4cce2309f662d5b5780212f469476f5660cc4f32b957ac8f73a571295f2a"}],"package_integrity":[{"filename":"chromestaff-baileys-1.1.3.tgz","hashes":{"sha1":"c2fefc60b80c9bd86bd9ce57773835ae35fb1654","sha512_sri":"sha512-Rs5SbhcV8jg5cyiLyRjI3wp3VWOpV4sBD8ETnmST7rDyS+dtQw+HVdvFdEwxyvzfk944gmkqoA1P6pabcyI2hw=="}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/withdrawn/npm/chromestaff-baileys/MAL-2026-4519.json"}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/chromestaff-baileys/v/1.1.3"},{"type":"ARTICLE","url":"https://www.ox.security/blog/phantomsub-malicious-npm-campaign-secretly-adds-users-to-whatsapp-spam-channels/"}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-004694","import_time":"2026-05-26T05:53:06.159529712Z","modified_time":"2026-05-25T14:50:39Z","sha256":"4d5fad12014025f37f607a61051a445262f37bcee6682850dfd77cc0dcb0b486","source":"amazon-inspector","versions":["1.1.3"]}]},"credits":[{"name":"Amazon Inspector","contact":["actran@amazon.com"],"type":"FINDER"},{"name":"OX Security","type":"FINDER"}]}