MAL-2026-10665: Malicious code in @fhkry/x-baileys (npm)
The npm package @fhkry/x-baileys is a malicious fork impersonating the original Baileys WhatsApp library. It contains covert code that, after 120 seconds of socket creation, fetches a remote JSON file with base64-encoded WhatsApp newsletter IDs and silently subscribes the user's WhatsApp account to these newsletters. Additionally, it automatically joins attacker-controlled WhatsApp groups without user consent. The attacker can update the lists remotely, enabling dynamic control over the compromised accounts. The package falsely claims the original author and misleads users about its origin. Installation of this package compromises the user's WhatsApp identity and potentially the host system.
AI Analysis
Technical Summary
The @fhkry/x-baileys npm package is a malicious impersonation of the @whiskeysockets/baileys library. It adds hidden functionality that triggers two side effects on any WhatsApp socket created: (1) after 120 seconds, it decodes and fetches a remote JSON containing base64-encoded newsletter IDs and silently subscribes the user's WhatsApp account to these newsletters; (2) upon connection update, it automatically accepts invites to attacker-controlled WhatsApp groups. Both the newsletter and group invite lists are remotely hosted on GitHub and can be changed by the attacker at any time. The package metadata falsely claims the original Baileys maintainer as author and uses a misleading homepage URL, confirming intent to deceive. This results in silent hijacking of the consumer's WhatsApp identity to follow attacker-chosen content and groups. The compromise extends beyond WhatsApp as the package grants attacker control over the host environment. Removal of the package alone may not fully remediate the compromise.
Potential Impact
Any system with this package installed or running is considered fully compromised. The attacker gains the ability to silently subscribe the user's WhatsApp account to newsletters and join WhatsApp groups under the user's identity without consent. This hijacks the user's WhatsApp presence and can expose them to further social engineering or information leakage. Because the package executes code that interacts with authenticated WhatsApp sessions and can be updated remotely, the attacker maintains persistent control. Additionally, full compromise of the host system is possible, risking all stored secrets and keys. Immediate secret rotation is required from a clean environment after removal.
Mitigation Recommendations
There is no official patch or fix available for this malicious package. The package should be immediately removed from all environments. All secrets, keys, and credentials stored on affected systems should be considered compromised and rotated immediately from a different, clean device. Due to the potential for full system compromise, a full security audit and possible system rebuild is recommended. Avoid using this package or any forks that impersonate legitimate libraries. Verify package authenticity and source before installation.
MAL-2026-10665: Malicious code in @fhkry/x-baileys (npm)
Description
The npm package @fhkry/x-baileys is a malicious fork impersonating the original Baileys WhatsApp library. It contains covert code that, after 120 seconds of socket creation, fetches a remote JSON file with base64-encoded WhatsApp newsletter IDs and silently subscribes the user's WhatsApp account to these newsletters. Additionally, it automatically joins attacker-controlled WhatsApp groups without user consent. The attacker can update the lists remotely, enabling dynamic control over the compromised accounts. The package falsely claims the original author and misleads users about its origin. Installation of this package compromises the user's WhatsApp identity and potentially the host system.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The @fhkry/x-baileys npm package is a malicious impersonation of the @whiskeysockets/baileys library. It adds hidden functionality that triggers two side effects on any WhatsApp socket created: (1) after 120 seconds, it decodes and fetches a remote JSON containing base64-encoded newsletter IDs and silently subscribes the user's WhatsApp account to these newsletters; (2) upon connection update, it automatically accepts invites to attacker-controlled WhatsApp groups. Both the newsletter and group invite lists are remotely hosted on GitHub and can be changed by the attacker at any time. The package metadata falsely claims the original Baileys maintainer as author and uses a misleading homepage URL, confirming intent to deceive. This results in silent hijacking of the consumer's WhatsApp identity to follow attacker-chosen content and groups. The compromise extends beyond WhatsApp as the package grants attacker control over the host environment. Removal of the package alone may not fully remediate the compromise.
Potential Impact
Any system with this package installed or running is considered fully compromised. The attacker gains the ability to silently subscribe the user's WhatsApp account to newsletters and join WhatsApp groups under the user's identity without consent. This hijacks the user's WhatsApp presence and can expose them to further social engineering or information leakage. Because the package executes code that interacts with authenticated WhatsApp sessions and can be updated remotely, the attacker maintains persistent control. Additionally, full compromise of the host system is possible, risking all stored secrets and keys. Immediate secret rotation is required from a clean environment after removal.
Mitigation Recommendations
There is no official patch or fix available for this malicious package. The package should be immediately removed from all environments. All secrets, keys, and credentials stored on affected systems should be considered compromised and rotated immediately from a different, clean device. Due to the potential for full system compromise, a full security audit and possible system rebuild is recommended. Avoid using this package or any forks that impersonate legitimate libraries. Verify package authenticity and source before installation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10665
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-mxxc-f6p6-98j7"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a577ecd68715ace43b3ef54
Added to database: 07/15/2026, 12:36:29 UTC
Last enriched: 07/15/2026, 12:40:36 UTC
Last updated: 07/16/2026, 03:34:27 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.