Saturday, August 15, 2026
LIVE
Ugandan villages still contest land titles as oil development advances///Nigerian Troops Repel Bandit Attack on Kebbi Workers///NLC Queries Lagos Chairman Over Ties to Pro-Tinubu Group///Côte d’Ivoire Names New Leader for Blé Goudé’s COJEP Party///United States Highlights Civilian Deaths in Nigeria Terror Fight///Zimbabwe Pledges New Ferry and Road Repair After Lake Kariba Disaster///Ebola death toll reaches two thousand in Democratic Republic of the Congo///Forced Conscription Reports Emerge Across Ethiopia Oromia Region///Ebola outbreak reaches displacement camps in eastern Democratic Republic of the Congo///Hacking Group Claims Data Theft from Shell and Other Global Firms///Turkey warns of radical measures if Israel rejects Gaza peace deal terms///Nigerian President Urged to Engage Niger Delta Leader for Reelection Campaign///Ugandan villages still contest land titles as oil development advances///Nigerian Troops Repel Bandit Attack on Kebbi Workers///NLC Queries Lagos Chairman Over Ties to Pro-Tinubu Group///Côte d’Ivoire Names New Leader for Blé Goudé’s COJEP Party///United States Highlights Civilian Deaths in Nigeria Terror Fight///Zimbabwe Pledges New Ferry and Road Repair After Lake Kariba Disaster///Ebola death toll reaches two thousand in Democratic Republic of the Congo///Forced Conscription Reports Emerge Across Ethiopia Oromia Region///Ebola outbreak reaches displacement camps in eastern Democratic Republic of the Congo///Hacking Group Claims Data Theft from Shell and Other Global Firms///Turkey warns of radical measures if Israel rejects Gaza peace deal terms///Nigerian President Urged to Engage Niger Delta Leader for Reelection Campaign///
Subscribe
Africa
Independent · Digital
The African Herald
PoliticsAI-assisted

Malicious NPM Package Hits 56K Downloads, Steals WhatsApp Messages

## Cybersecurity: Compromise of npm Registry via Malicious Package

Cybersecurity: Compromise of npm Registry via Malicious Package

A recent malware campaign has infiltrated the npm registry through a package that imitates legitimate WhatsApp API functionality while covertly exfiltrating authentication credentials, messages, contacts, and media files from developers.

The "lotusbail" package was downloaded over 56,000 times during its six-month availability on npm. This incident represents a significant evolution in supply chain attacks, where functional code hides sophisticated data theft operations.

The package masquerades as a fork of the legitimate @whiskeysockets/baileys library, providing genuine WhatsApp Web API capabilities.

Unlike typical malicious packages, which may be detected through broken functionality or obvious typosquatting, "lotusbail" delivers a working interface for WhatsApp message handling. This allows it to pass code reviews and testing phases, ultimately reaching production environments where traditional security measures fail to detect its malicious nature.

Weaponizing Trust Through Working Code

The malware operates by manipulating WebSocket connections, intercepting all messages flowing through the application. It wraps the legitimate WhatsApp communication channel, capturing session tokens and authentication keys during the authentication process.

All incoming and outgoing messages pass through the malware's socket wrapper, creating a surveillance mechanism that duplicates WhatsApp activity without disrupting functionality.

A recent malware campaign has infiltrated the npm registry through a package that imitates legitimate WhatsApp API functionality while covertly exfiltrating authentication credentials, messages, contacts, and media files from developers.
Amara Diallo · The African Herald

Stolen data is encrypted using custom RSA encryption before exfiltration, making detection by network monitoring tools difficult. This custom cryptographic implementation is unnecessary for a WhatsApp library, as WhatsApp already provides end-to-end encryption.

The malware employs four layers of obfuscation to hide the exfiltration server's location: Unicode variable manipulation, LZString compression, Base-91 encoding, and AES encryption. The server URL is not visible in plaintext within the package code.

This backdoor persists independently of the npm package; uninstalling the malicious library removes the code but leaves the attacker's device linked to the victim's WhatsApp account until manually disconnected through WhatsApp's device management settings.

The attack exploits WhatsApp's device pairing process. The malware contains a hardcoded pairing code encrypted with AES, embedded in the package.

Advertisement

During application authentication, developers unknowingly link the attacker's device to their WhatsApp account, granting the attacker full account control. The attacker can read messages, send messages as the victim, download media files, and access contact lists.

The package includes 27 infinite loop traps to detect debugging tools, sandbox environments, and dynamic analysis attempts, preventing security researchers from examining the malware's behavior during execution.

This attack highlights the need for runtime behavioral analysis capable of detecting anomalies, such as custom encryption implementations and anti-debugging mechanisms in packages claiming to provide standard API functionality.

Based on reporting by GBHackers.

AI transparency. This article was produced with the assistance of artificial intelligence and published under human editorial oversight. AI systems can make mistakes. Read how we use AI (EU AI Act, Art. 50).
Related Stories