Worrying WhatsApp attack can steal messages and even accounts - here's how to stay safe from "poisoned" attack
A fork of a popular project was found on npm
· TechRadarNews By Sead Fadilpašić published 23 December 2025
(Image credit: Shutterstock / Jozsef Bagota) Share Share by:
Share this article 0 Join the conversation Follow us Add us as a preferred source on Google
- Malicious NPM package lotusbail hijacks WhatsApp accounts, stealing tokens, messages, and contacts
- Attackers link their device via WhatsApp pairing, persisting even after package removal
- Package had 56,000+ downloads before discovery; developers urged to verify sources carefully
Node Package Manager (NPM) registry users are being targeted with malware that takes over their WhatsApp accounts, steals messages, and contacts lists, experts have warned.
Cybersecurity researchers Koi Security recently discovered a fork of the popular WhiskeySockets Baileys project, an open source TypeScript/JavaScript library that provides a WebSocket-based API for interacting with the WhatsApp Web protocol, letting developers programmatically connect to WhatsApp as a companion device.
The malicious fork, named ‘lotusbail’ has all the same functionality as the legitimate project, but it also steals WhatsApp authentication tokens and session keys. Furthermore, it intercepts and records all messages, pulls contacts, media files, and all other documents, to a third-party server.
Taking over WhatsApp accounts
"The package wraps the legitimate WebSocket client that communicates with WhatsApp. Every message that flows through your application passes through the malware's socket wrapper first," Koi Security said in its report.
"When you authenticate, the wrapper captures your credentials. When messages arrive, it intercepts them. When you send messages, it records them."
But perhaps most alarmingly, the package links the attacker’s device with the victim’s WhatsApp account through the app’s pairing feature. That means that even if the victim removes the malicious NPM package, their WhatsApp account remains compromised until the link is manually disconnected.
The malware was sitting on npm for at least half a year, and during that time it amassed more than 56,000 downloads.
Are you a pro? Subscribe to our newsletter
Sign up to the TechRadar Pro newsletter to get all the top news, opinion, features and guidance your business needs to succeed!
Contact me with news and offers from other Future brandsReceive email from us on behalf of our trusted partners or sponsors