Malicious Code Injection in baileys-xbats: Covert Channel Subscription Vulnerability

baileys-xbats Updated 30 Sep 2026

Summary

30/09/2026
CRITICAL
No i
Critical
Not published

MAL-2026-17388: Malicious code in baileys-xbats (npm). Affects baileys-xbats versions 1.0.0 – 1.0.3. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The baileys-xbats package is a fork of the Baileys WhatsApp Web library, designed to facilitate interactions with the WhatsApp API. It is part of a larger family of similar packages that have been identified as potentially malicious. This package allows developers to build applications that can send and receive messages on WhatsApp, but the recent discovery of malicious code within certain versions raises serious security concerns.

Vulnerability Detail

The vulnerability in baileys-xbats arises from malicious code that injects a covert channel-subscription action into the WhatsApp socket layer. Upon connection, the injected code executes an authenticated 'w:mex' FOLLOW query against attacker-chosen WhatsApp Channel/Newsletter JIDs using the installer's own authenticated session. This silently subscribes the victim's account to channels without their consent. The obfuscation techniques used to hide the target JIDs make it difficult for users to detect this malicious behavior. The vulnerability does not exfiltrate credentials or execute arbitrary remote code but exploits the user's authenticated session for unauthorized channel subscriptions.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall baileys-xbats

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, consider removing the baileys-xbats package from your project until a secure version is confirmed. You can do this by running: npm uninstall baileys-xbats. Additionally, monitor your WhatsApp account for any unauthorized subscriptions.

Conclusion

The baileys-xbats package contains a significant vulnerability that allows malicious code to exploit users' authenticated WhatsApp sessions for unauthorized channel subscriptions. It is crucial for developers to update to the latest version or remove the package entirely to protect their accounts. Utilizing tools like Vulert can help in monitoring and managing open-source vulnerabilities effectively.

See every vulnerability recorded for baileys-xbats →

Share this vulnerability

FAQ

Baileys-xbats is a fork of the Baileys WhatsApp Web library that allows developers to interact with the WhatsApp API.

The vulnerability allows malicious code to subscribe your WhatsApp account to channels without your consent, potentially leading to unwanted notifications and exposure to harmful content.

If you have installed an affected version of baileys-xbats, you should immediately update to the latest version or uninstall the package to mitigate the risk.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. By analyzing your package-lock.json file, Vulert can help you identify if your application is affected. You can also use the Vulert playground without signup at Vulert Scanner.

To prevent similar vulnerabilities, always review package dependencies, keep them updated, and use tools like Vulert to monitor for vulnerabilities in your open-source packages.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall baileys-xbats

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback