@xzvbailss/baileysnpm
Advisory published Updated
@xzvbailss/baileys is a confirmed malicious npm package (MAL-2026-19946) that executes malicious code on install (malicious versions 1.0.0, 5.0.0, 6.0.0…). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in @xzvbailss/baileys (npm)
What this malware does
@xzvbailss/baileys is a fork of the Baileys WhatsApp Web library that silently subscribes the installer's own WhatsApp account to WhatsApp Channels chosen by the publisher. makeNewsletterSocket in lib/Socket/newsletter.js declares a hardcoded list of channel IDs (120363430764800148@newsletter) and a setTimeout that, 2.5 minutes after every socket creation, calls newsletterWMexQuery(id, QueryIds.FOLLOW) for each entry with the victim's authenticated session, 5 seconds apart, swallowing errors. Nothing is shown to the user. Version 6.0.0, published 2026-11-11T19:16Z, keeps the same channel but hides its ID as a base64 string (MTIwMzYzNDMwNzY0ODAwMTQ4QG5ld3NsZXR0ZXI=, decoded at load) and moves the trigger: on every connection.update with connection 'open' it waits 90 seconds and sends the same FOLLOW query, logging failures only at debug level. Same behaviour as the PhantomSub family (MAL-2026-17342). lib/Socket/luxu.js (sha256 cd8e9549dbf382dc7dd32a9c1cd2eb98c8db2bd5a97a0df9a77e4062429053e3) is byte-identical to the file of the same name in @poucode/baileys (MAL-2026-18873) and contains the literal string "POUCODE", so the two forks share a toolkit. The package.json repository field is a Telegram link (https://t.me/JustRxVz), not a source repository. The same publisher's unscoped xzvbailss is MAL-2026-18702.
This fork of the Baileys WhatsApp library declares @xzvbailss/xzgateway: "latest" as a required dependency and @xzvbailss/xz-protect: "latest" as an optional dependency. The latest dist-tag is mutable and under the same author's control, with no version pin and no integrity check. Utils/crypto.js, Utils/lt-hash.js, and Utils/chat-utils.js import symbols (md5, hkdf, LTHashAntiTampering, expandAppStateKeys) from @xzvbailss/xzgateway at top level, so whatever code the author publishes under that name runs inside the installer's process on require('@xzvbailss/baileys'). Socket/index.js additionally performs import('@xzvbailss/xz-protect') when AnchorGuard is enabled and passes the live WhatsApp socket to createAntiBugGuard. The imported helpers are on the path that derives WhatsApp Noise/AppState encryption keys, so a future publish to either dist-tag can execute arbitrary code with access to the installer's host and intercept the installer's WhatsApp keys. Separately, on every successful connection open the library silently calls sock.newsletterFollow('120363430764800148@newsletter') (up to 3 attempts) under the installer's logged-in WhatsApp account, documented only as an opt-out via autoFollowNewsletters: false, using the installer's identity for reach-padding of an author-controlled channel.
Any 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.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Malicious packageFind it
Search your lockfiles and build artifacts for @xzvbailss/baileys (6 malicious versions).
If you installed it — respond
Remove @xzvbailss/baileys from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.
Did it already run?
If @xzvbailss/baileys was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
- CyberXYZ · finder
Detect & block this
O3 blocks @xzvbailss/baileys-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.