Lotusbail is a malicious npm package (trojanized dependency) masquerading as a WhatsApp Web API library and presented as a fork/wrapper of the legitimate Baileys / @whiskeysockets/baileys project. It was available on npm for roughly six months (uploaded May 2025) and accumulated >56,000 downloads. The package provides real WhatsApp integration functionality to evade suspicion and static/reputation-based detection.
Capabilities and behavior (as described):
Infection vector / targeting:
Attribution / reporting:
Known indicators of compromise:
9 distinct techniques documented for this family, organized by ATT&CK tactic.
"The lotusbail npm package presents itself as a WhatsApp Web API library - a fork of the legitimate @whiskeysockets/baileys package... Behind that working functionality: sophisticated malware..."
"The malware hijacks this process with a hardcoded pairing code... linking the threat actor's device... persistent access... uninstalling... device stays linked"
"The malware hijacks this process with a hardcoded pairing code... linking the threat actor's device... persistent access... uninstalling... device stays linked"
"The exfiltration server URL is buried in encrypted configuration strings... four layers of obfuscation: Unicode variable manipulation, LZString compression, Base-91 encoding, and AES encryption."
"The package includes 27 infinite loop traps that freeze execution if debugging tools are detected... detect sandbox environments"
"When messages arrive, it intercepts them. When you send messages, it records them."
"When you authenticate, the wrapper captures your credentials... Authentication tokens and session keys"
"The package wraps the legitimate WebSocket client that communicates with WhatsApp. Every message... passes through the malware's socket wrapper first."
"The package includes 27 infinite loop traps that freeze execution if debugging tools are detected... detect sandbox environments"
"When messages arrive, it intercepts them. When you send messages, it records them."
"Complete message history (past and present) Full contact lists with phone numbers Media files and documents"
"The package wraps the legitimate WebSocket client that communicates with WhatsApp. Every message... passes through the malware's socket wrapper first."
"...prepared for exfiltration... includes a complete, custom RSA implementation for encrypting the data before transmission"
10 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.