Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Fake WhatsApp API Package on npm Steals Messages, Contacts, and Login Tokens

0
Medium
Vulnerabilityrce
Published: Mon Dec 22 2025 (12/22/2025, 16:28:00 UTC)
Source: The Hacker News

Description

Cybersecurity researchers have disclosed details of a new malicious package on the npm repository that works as a fully functional WhatsApp API, but also contains the ability to intercept every message and link the attacker's device to a victim's WhatsApp account. The package, named "lotusbail," has been downloaded over 56,000 times since it was first uploaded to the registry by a user named "

AI-Powered Analysis

AILast updated: 12/22/2025, 18:24:11 UTC

Technical Analysis

The threat involves a malicious npm package named "lotusbail" that impersonates a legitimate WhatsApp API library, leveraging the popularity of the @whiskeysockets/baileys TypeScript library to appear functional and trustworthy. Uploaded in May 2025 and downloaded over 56,000 times, the package acts as a fully operational WhatsApp API but covertly intercepts all WhatsApp messages, contacts, media files, and authentication tokens by wrapping the WebSocket client used for WhatsApp Web API communication. This interception allows the attacker to capture sensitive data in real-time and exfiltrate it in encrypted form to a server they control. Critically, the package includes a hard-coded pairing code that links the attacker's device to the victim's WhatsApp account during authentication, granting persistent, undetectable access to the victim’s conversations and contacts. This backdoor remains active even if the malicious package is uninstalled, as the attacker’s device remains linked until manually removed via WhatsApp settings. The malware also employs anti-debugging techniques, such as infinite loop traps, to hinder analysis and detection. This supply chain attack exploits developer trust in npm packages, bypassing traditional static analysis and reputation-based security controls because the package performs legitimate WhatsApp API functions alongside malicious activities. The attack vector targets developers who incorporate WhatsApp API functionality into applications, potentially compromising end users’ WhatsApp accounts and data. The incident underscores the growing threat of supply chain attacks in open source ecosystems, where malicious code can infiltrate widely used libraries and tools, evading conventional security measures.

Potential Impact

For European organizations, the impact of this threat can be significant, especially for those relying on WhatsApp for business communications or integrating WhatsApp APIs into their applications. Confidentiality is severely compromised as attackers can access private messages, contact lists, media, and documents, leading to potential data breaches and privacy violations under GDPR. Integrity is affected since attackers can maintain persistent access to WhatsApp accounts, potentially manipulating communications or impersonating users. Availability might be indirectly impacted if attackers disrupt communications or cause account lockouts. The persistent backdoor enables long-term espionage or data exfiltration without detection. Organizations in sectors such as finance, legal, healthcare, and government, where WhatsApp is used for sensitive communications, face heightened risks. Additionally, developers and software supply chains in Europe are at risk of inadvertently distributing compromised applications. The attack also undermines trust in open source ecosystems, potentially causing reputational damage and operational disruptions. Given the package’s continued availability and active downloads, the threat remains current and relevant.

Mitigation Recommendations

European organizations should implement a multi-layered mitigation strategy: 1) Enforce strict vetting and validation of all third-party npm packages, including verifying publisher authenticity and scanning for malicious behavior using advanced dynamic analysis tools beyond static code checks. 2) Monitor WhatsApp linked devices regularly and educate users on how to unlink unknown devices via WhatsApp settings to remove persistent backdoors. 3) Employ runtime application self-protection (RASP) and behavioral monitoring to detect anomalous WebSocket traffic or unauthorized data exfiltration. 4) Use dependency management tools that support supply chain security features such as provenance tracking, package signing, and vulnerability alerts. 5) Encourage developers to use official or well-vetted WhatsApp API libraries and avoid unverified packages. 6) Integrate threat intelligence feeds to stay updated on emerging supply chain threats and malicious packages. 7) Conduct regular security awareness training focused on supply chain risks and secure coding practices. 8) Collaborate with npm and other repository maintainers to report and expedite removal of malicious packages. 9) Implement network-level controls to detect and block suspicious outbound connections to attacker-controlled servers. 10) Consider adopting zero trust principles for internal communications and API integrations to limit lateral movement in case of compromise.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Article Source
{"url":"https://thehackernews.com/2025/12/fake-whatsapp-api-package-on-npm-steals.html","fetched":true,"fetchedAt":"2025-12-22T18:23:53.993Z","wordCount":1340}

Threat ID: 69498cbc5b5b68b8f5deea6a

Added to database: 12/22/2025, 6:23:56 PM

Last enriched: 12/22/2025, 6:24:11 PM

Last updated: 12/26/2025, 6:49:55 PM

Views: 67

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats