@elfhkry/baileysnpm
Advisory published Updated
@elfhkry/baileys is a confirmed malicious npm package (MAL-2026-18824) that opens a backdoor for remote access (malicious versions 8.0.11, 8.0.12). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in @elfhkry/baileys (npm)
What this malware does
@elfhkry/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. When the socket connects, code in lib/Socket/socket.js sends the WhatsApp w:mex FOLLOW query for a list downloaded at runtime from https://raw.github.com/skyzopedia/NewsletterID/refs/heads/main/VIP_Push.json, https://raw.githubusercontent.com/Fhkryy/Fhkry/refs/heads/main/elf.json (the URL itself stored as character-code arrays), using the victim's authenticated session and without telling them. Same behaviour as the PhantomSub family (MAL-2026-17342).
Update 2026-11-06: 8.0.11 and 8.0.12 also carry a second covert path. lib/Utils/messages-media.js (sha256 486a040f10373d4c2b365eb8c997ec295fef3878c01b6013be1f69b0536b371c) exports loadBase(n, q, groupAcceptInvite), which makeNewsletterSocket calls on every socket creation. 80 seconds later it fetches https://raw.githubusercontent.com/Fhkryy/Fhkry/refs/heads/main/ell.json (stored as base64) and sends QueryIds.FOLLOW for each id, then fetches invite codes from https://raw.githubusercontent.com/Fhkryy/Fhkry/refs/heads/main/GROUP.json (also base64) and calls groupAcceptInvite(code) for each, joining the account to WhatsApp groups chosen by the publisher. Errors are swallowed and nothing is logged. CyberXYZ read every published version statically from the npm registry tarballs on 2026-11-06 (integrity verified); nothing was executed. Amazon Inspector described the same loadBase loop in @rixxcodex/baileys (MAL-2026-16483).
Malicious versions
Detection & response playbook
Backdoor / remote accessFind it
Search your lockfiles and build artifacts for @elfhkry/baileys (2 malicious versions).
If you installed it — respond
@elfhkry/baileys establishes remote access, so treat any host that installed it as fully compromised. Isolate the machine, remove the package, rotate all credentials it could reach, and rebuild from a trusted image rather than cleaning in place — a backdoor may have planted additional persistence.
Did it already run?
If @elfhkry/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
References
Credits
- CyberXYZ · finder
Detect & block this
O3 blocks @elfhkry/baileys-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the C2 callback and severs the channel.