Malicious Code Injection in my-baileys: Unauthorized WhatsApp Channel Subscription

my-baileys Updated 30 Sep 2026

Summary

30/09/2026
CRITICAL
No i
Critical
Not published

MAL-2026-17400: Malicious code in my-baileys (npm). Affects my-baileys versions 1.0.1 – 1.0.5. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

my-baileys is an npm package that serves as a fork of the Baileys WhatsApp Web library, designed to facilitate interactions with the WhatsApp Web API. It allows developers to build applications that can send and receive messages, manage contacts, and perform various actions on WhatsApp. However, certain versions of this package have been compromised, leading to a significant security vulnerability that exploits users' authenticated sessions.

Vulnerability Detail

The vulnerability in my-baileys arises from the injection of malicious code that activates upon connection to the WhatsApp socket layer. This code executes an unauthorized 'w:mex' FOLLOW query, subscribing the victim's account to attacker-controlled WhatsApp channels without their consent. The obfuscation techniques used to conceal the target JIDs make it difficult for users to detect this malicious behavior. While the attack does not exfiltrate credentials or execute arbitrary code, it leverages the user's authenticated session to gain unauthorized access to their WhatsApp account.

How To Fix

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

npm uninstall my-baileys

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

If immediate updating is not feasible, consider removing the my-baileys package from your project until a secure version is available. You can do this by executing: npm uninstall my-baileys. Additionally, monitor your WhatsApp account for any unauthorized subscriptions and remove them promptly.

Conclusion

The my-baileys package has been compromised, allowing attackers to exploit users' authenticated WhatsApp sessions to subscribe them to unwanted channels. It is crucial to update to a secure version to protect against this vulnerability. Utilize tools like Vulert to monitor your applications for vulnerabilities effectively.

See every vulnerability recorded for my-baileys →

Share this vulnerability

FAQ

my-baileys is an npm package that allows developers to interact with the WhatsApp Web API, enabling functionalities like sending messages and managing contacts.

The vulnerability allows attackers to subscribe your WhatsApp account to channels without your consent, potentially leading to unwanted notifications and privacy concerns.

Versions 1.0.1 to 1.0.5 of the my-baileys package are affected by this vulnerability.

You can use Vulert, which monitors open-source vulnerabilities in real-time. By analyzing your package-lock.json file, Vulert can alert you to any vulnerabilities, including this one. Visit Vulert Scanner to check your application without signup.

If you cannot update the my-baileys package right away, consider uninstalling it and monitoring your WhatsApp account for any unauthorized subscriptions.

How To Fix

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

npm uninstall my-baileys

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