{"id":"GHSA-fwcp-q8x6-4fc2","kind":"package","aliases":["GHSA-fwcp-q8x6-4fc2","MAL-2026-17384"],"related":[],"title":"Malicious code in @xayz/baileys (npm)","description":"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: @xayz/baileys (npm), version(s): 6.1.8, 6.1.7, 6.1.6, 6.1.5, 6.1.4, 6.1.3, 6.1.2, 6.1.1, 6.1.0, 6.0.75, 6.0.6, 6.0.5, 6.0.4, 6.0.3, 6.0.2, 6.0.1, 6.0.0, 5.0.0, 4.0.0, 3.0.0.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (3970c07a60e90f00f876e1f17c68e2eac1de32b845c00599ccf54b522b2d7245)\nOn the first successful WhatsApp connection via makeWASocket, the library issues a FOLLOW query for a hardcoded author-controlled newsletter JID (120363427430697245@newsletter) using the end user's authenticated WhatsApp session. The behavior is driven by a DEFAULT_AUTO_FOLLOW_CHANNELS constant consumed by the connection 'open' handler, which calls newsletterWMexQuery(jid, QueryIds.FOLLOW) for each entry. The behavior is documented and can be disabled via autoFollowChannels:false, but the default-on configuration uses the installer-user's WhatsApp identity to inflate the author's channel reach on a third-party platform. No credential theft, no exfiltration of installer secrets, no remote code execution, no persistence, and no install- or import-time destructive action; the ping-related static match in lib/Utils/generics.js corresponds to a WebSocket keepalive/latency utility, not network exfiltration.\n\n## Source: ghsa-malware (b89023f96479d3074004c89716c5ed91b7bd86f978b92b69675c4d2e124d4f01)\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.","summary":null,"severity":"critical","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"@xayz/baileys","fixed":[],"affected":"all versions","ecosystem":"npm"}],"ecosystems":["npm"],"tags":["malicious","package"],"not_affected_if":[],"how_to_check":null,"fix":null,"status":"open","published_at":"2026-10-08T13:31:42+00:00","first_seen_at":"2026-10-29T14:24:36+00:00","triaged_at":"2026-10-29T14:25:47+00:00","updated_at":"2026-10-29T18:53:01+00:00","category":"package","confidence":null,"triage":null,"analyst_status":null,"analyst_note":null,"search":"'-17384':13A '-2026':12A '100':30C '120363427430697245':311C '2026':35C '3.0.0':274C '3970c07a60e90f00f876e1f17c68e2eac1de32b845c00599ccf54b522b2d7245':288C '4.0.0':273C '4fc2':10A,18A '5.0.0':272C '6.0.0':271C '6.0.1':270C '6.0.2':269C '6.0.3':268C '6.0.4':267C '6.0.5':266C '6.0.6':265C '6.0.75':264C '6.1.0':263C '6.1.1':262C '6.1.2':261C '6.1.3':260C '6.1.4':259C '6.1.5':258C '6.1.6':257C '6.1.7':256C '6.1.8':255C '7871414976211147':74C 'abus':219C 'account':98C 'across':123C 'action':54C,218C,406C 'affect':249C 'amazon':286C 'amazon-inspector':285C 'anoth':161C 'arbitrari':246C 'array':139C 'ask':103C 'attack':80C,150C,234C 'attacker-chosen':79C 'attacker-control':149C,233C 'authent':67C,90C,224C,318C 'author':307C,374C 'author-control':306C 'auto':328C 'autofollowchannel':355C 'b89023f96479d3074004c89716c5ed91b7bd86f978b92b69675c4d2e124d4f01':428C 'bailey':43C 'base64':130C,132C 'behavior':322C,347C 'call':339C 'casual':113C 'chang':169C 'channel':52C,100C,236C,330C,376C 'channel-subscript':51C 'channel/newsletter':83C 'char':137C 'char-cod':136C 'chosen':81C 'code':2A,64C,138C,248C,394C 'compromis':442C 'comput':430C,450C,458C,470C 'configur':362C 'connect':61C,191C,201C,294C,335C 'consid':440C 'constant':331C 'consum':332C 'control':151C,235C,308C,467C 'correspond':415C 'covert':50C 'credenti':241C,385C 'default':327C,360C 'default-on':359C 'destruct':405C 'detail':277C 'differ':213C,457C 'disabl':353C 'document':349C 'driven':324C 'edit':280C 'encod':131C 'end':315C 'entiti':478C 'entri':345C 'establish':242C 'even':202C 'everi':177C 'execut':245C,395C 'exfiltr':240C,388C,423C 'fals':356C 'famili':29C,125C,181C 'fetch':146C 'fire':194C 'first':291C 'follow':70C,196C,301C,329C 'fork':40C,215C 'full':466C 'fulli':441C 'fwcp':8A,16A 'gain':228C 'ghsa':7A,15A,426C 'ghsa-fwcp-q8x6-4fc2':6A,14A 'ghsa-malwar':425C 'github':159C 'given':474C 'guarante':482C 'handler':337C 'hardcod':305C 'hidden':111C 'host':162C 'id':73C 'ident':39C,370C 'identifi':31C 'immedi':454C 'import':403C 'import-tim':402C 'inflat':372C 'inject':48C,63C 'inspector':287C 'instal':87C,171C,221C,366C,390C,400C,435C,494C 'installer-us':365C 'instead':145C 'issu':65C,299C 'jid':84C,108C,157C,207C,310C,341C 'join':105C 'json/js':153C 'keepalive/latency':419C 'key':446C 'larg':28C 'layer':59C 'let':165C 'lib/utils/generics.js':414C 'librari':46C,298C 'line':283C 'list':154C,168C 'liter':129C 'makewasocket':296C 'mal':11A 'malici':1A,20B,217C,490C 'malwar':427C 'match':412C 'may':471C 'mechan':186C 'method':212C 'mex':69C 'mutabl':148C 'name':206C 'near':38C 'near-ident':37C 'network':422C 'never':102C 'new':174C 'newslett':309C,312C 'newsletterwmexqueri':340C 'npm':5A,175C,252C 'obfusc':120C 'obfuscation/delivery':211C 'observ':122C 'one':76C,117C 'open':336C 'outsid':477C 'packag':21B,23C,205C,250C,434C,460C,486C 'part':25C 'parti':382C 'per':214C,275C 'persist':243C,397C 'ping':409C 'ping-rel':408C 'plain':127C 'platform':383C 'publish':176C 'q8x6':9A,17A 'queri':71C,72C,197C,302C 'queryids.follow':342C 'reach':229C,377C 'reconstruct':140C 'relat':410C 'remot':152C,247C,393C 'remov':463C,484C,488C 'result':492C 'review':115C 'rotat':453C 'routin':192C 'run':437C 'runtim':142C,164C 'sampl':178C 'second':199C 'secret':391C,444C 'septemb':34C 'session':92C,226C,320C 'sever':119C 'share':182C 'silent':93C 'socket':58C,190C 'socket-connect':189C 'softwar':491C 'sourc':114C,276C,284C,424C 'static':411C 'store':447C 'string':128C 'subscrib':94C,231C 'subscript':53C 'success':292C 'target':107C,156C,167C 'techniqu':121C 'theft':386C 'third':381C 'third-parti':380C 'though':203C 'time':404C 'under':185C 'use':85C,313C,363C 'user':316C,367C 'util':420C 'valu':208C 'variant':144C 'version':253C 'via':116C,295C,354C 'victim':96C 'w':68C 'web':45C 'websocket':418C 'whatsapp':44C,57C,82C,91C,225C,293C,319C,369C 'without':172C 'wrapped/patched':188C 'xayz/baileys':4A,19A,251C 'xor':133C","nicknames":[],"mitigations":[],"who_affected":null,"tier":null,"verified":{},"analyst_revisit_at":null,"fix_status":null,"audience":"developers","plain_action":null,"first_public_at":"2026-10-08T13:31:42+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"osv-malicious","external_id":"MAL-2026-17384","url":"https://osv.dev/vulnerability/MAL-2026-17384","severity":"critical","published_at":"2026-10-08T13:31:42+00:00","modified_at":"2026-10-29T13:48:10+00:00","first_seen_at":"2026-10-29T14:24:36+00:00","fetched_at":"2026-10-29T14:24:36+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}