Malicious Code Injection in @hanzofc/baileys: Covert Channel Subscription Vulnerability

@hanzofc/baileys Updated 30 Sep 2026

Summary

30/09/2026
CRITICAL
No i
Critical
Not published

MAL-2026-17354: Malicious code in @hanzofc/baileys (npm). Affects @hanzofc/baileys versions 7.0.0 – 7.0.1. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The @hanzofc/baileys package is 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 WhatsApp functionalities. However, this package has been identified as part of a larger family of malicious forks that inject harmful code into the WhatsApp socket layer, compromising user accounts.

Vulnerability Detail

The vulnerability arises from malicious code embedded within the @hanzofc/baileys package, which executes an unauthorized FOLLOW query to subscribe the victim's WhatsApp account to attacker-controlled channels. This occurs without the user's consent, leveraging the user's authenticated session to gain subscribers for malicious purposes. The code obfuscation techniques used to hide the target JIDs include base64 encoding and runtime reconstruction, making it difficult for users to detect the malicious behavior.

How To Fix

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

npm uninstall @hanzofc/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

As a temporary workaround, consider removing the @hanzofc/baileys package from your project until a secure version is confirmed. You can do this by running: npm uninstall @hanzofc/baileys. Additionally, monitor your application for any unauthorized subscriptions or activities.

Conclusion

The @hanzofc/baileys package has been identified as containing malicious code that can compromise user accounts by subscribing them to unwanted channels. It is essential to update the package to a secure version and monitor your applications for any suspicious activities. Utilizing tools like Vulert can help in identifying vulnerabilities in real-time.

See every vulnerability recorded for @hanzofc/baileys →

Share this vulnerability

FAQ

The vulnerability allows attackers to subscribe the victim's WhatsApp account to channels without their consent, potentially leading to unwanted notifications and privacy concerns.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without any signup.

To prevent similar vulnerabilities, always review package dependencies, use trusted sources, and keep your packages updated regularly.

If you suspect your account has been compromised, immediately revoke access to suspicious applications and change your WhatsApp password.

Yes, there are over 100 identified variants of this vulnerability, each using different obfuscation techniques to hide malicious actions.

How To Fix

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

npm uninstall @hanzofc/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