Malicious npm Package 'lotusbail' Steals WhatsApp Accounts and Messages
Supply Chain Risk · 8 sources · Updated 5mo ago · First seen Dec 22, 2025

A malicious package named lotusbail was discovered on the npm registry, masquerading as a legitimate WhatsApp Web API library. The package, a fork of the popular WhiskeySockets Baileys project, provides full WhatsApp API functionality while secretly stealing authentication tokens, session keys, messages, contact lists, media files, and documents from users. Researchers at Koi Security found that the package uses a malicious WebSocket wrapper to intercept all data passing through, encrypts the stolen information using multiple obfuscation techniques, and exfiltrates it to attacker-controlled servers.
In addition to data theft, lotusbail implements a covert device pairing process, linking the attacker's device to the victim's WhatsApp account and granting persistent access even after the malicious package is removed. The package has been available on npm for at least six months, accumulating over 56,000 downloads, and employs advanced anti-analysis techniques such as infinite loop traps to evade detection. Victims must manually remove unauthorized devices from their WhatsApp settings to revoke attacker access.
Why it matters
Impact assessment
Lotusbail is a high-impact software supply chain compromise affecting developers and organizations that integrated the npm package into WhatsApp-enabled applications or automation workflows. Exposure includes theft of WhatsApp authentication tokens, session keys, messages, contacts, media, and documents, plus persistent unauthorized account access through covert device pairing.
The scope is broad rather than narrowly targeted: the package reportedly remained on npm for at least six months and exceeded 56,000 downloads. There are clear indications of real-world exploitation because the malicious behavior executes during normal authentication and message exchange, and attacker access can persist after package removal until rogue linked devices are manually removed.
Affected populations
- Developers using the npm package
lotusbail - Organizations running applications built on WhatsApp Web API integrations
- Users whose WhatsApp accounts were authenticated through affected applications
- Development and CI/CD environments that installed the package from npm
Severity and business impact
- Account takeover risk for WhatsApp accounts used by affected applications
- Confidentiality loss involving messages, contact lists, media files, and documents
- Operational disruption if compromised accounts are abused to send messages or impersonate staff
- Reputational and legal risk if customer or business communications were exposed
- Persistence risk because attacker-linked devices remain authorized after uninstall unless manually revoked
Scope and exploitation status
- Package available for at least six months
- More than 56,000 downloads reported across references
- Active malicious behavior triggered in routine API use
- Exploitation in the wild is strongly indicated by sustained availability, high download volume, and direct credential/data interception


