@nexustechpro/baileysnpm
Advisory published Updated
@nexustechpro/baileys is a confirmed malicious npm package (MAL-2026-16104) that steals credentials and exfiltrates sensitive data (malicious versions 2.2.4, 2.2.5, 2.2.7). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in @nexustechpro/baileys (npm)
What this malware does
@nexustechpro/baileys is a fork of the Baileys WhatsApp library in which lib/Socket/chats.js (~270 KB) is transformed with obfuscator.io (large string-array with rotate loop, decoder wrapper, hex-escaped identifiers) while every other module under lib/Socket/ is plain, readable code matching upstream. The obfuscated module is re-exported from lib/Socket/index.js and therefore loads on every require() of the package, executing inside a socket chain that has access to the authenticated WhatsApp session credentials, contact list, and message stream. In addition, on every 'connection.update' where connection==='open', the package silently subscribes the installer's authenticated WhatsApp account to a hardcoded newsletter JID (120363422827915475@newsletter) and re-applies the subscription every 30 seconds via setInterval; an AUTO_FOLLOW_FORCE_MODE flag bypasses the already-following check so a user-initiated unfollow is undone. There is no configuration surface, opt-out, or documentation for this behavior. package.json also declares an unpinned first-party-sounding dependency 'whatsapp-rust-bridge: latest'. The package name and keywords mirror the upstream @whiskeysockets/baileys ecosystem.
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
Credential / info stealerFind it
Search your lockfiles and build artifacts for @nexustechpro/baileys (3 malicious versions).
If you installed it — respond
@nexustechpro/baileys is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If @nexustechpro/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
Detect & block this
O3 blocks @nexustechpro/baileys-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.