Malicious Code Injection in shadowmd Package: Covert Channel Subscription Vulnerability
Summary
MAL-2026-17405: Malicious code in shadowmd (npm). Affects shadowmd versions 8.6.87. No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The shadowmd package is part of a large family of forks derived from the Baileys WhatsApp Web library. It is designed to facilitate interactions with the WhatsApp messaging platform. However, this package has been identified as having a significant security vulnerability that allows malicious actors to inject covert actions into the WhatsApp socket layer, compromising user privacy and control over their subscriptions.
Vulnerability Detail
The vulnerability in the shadowmd package arises from its ability to inject malicious code that executes an unauthorized FOLLOW query against attacker-chosen WhatsApp Channel/Newsletter JIDs. This occurs using the installer's own authenticated WhatsApp session, resulting in the victim's account being silently subscribed to channels without their consent. The obfuscation techniques employed 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 it does exploit the user's authenticated session for nefarious purposes.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall shadowmd
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 measure, users can avoid using the shadowmd package until a secure version is released. Additionally, consider using alternative libraries that do not exhibit this vulnerability.
Conclusion
The shadowmd package contains a serious vulnerability that allows malicious code to exploit users' authenticated WhatsApp sessions, leading to unauthorized subscriptions to channels. Users are advised to update the package to a patched version and consider alternative libraries until a fix is available. Monitoring tools like Vulert can help keep applications secure.
See every vulnerability recorded for shadowmd →
FAQ
The shadowmd package is a fork of the Baileys WhatsApp Web library that facilitates interactions with the WhatsApp messaging platform.
The vulnerability allows attackers to silently subscribe your WhatsApp account to channels without your consent, using your authenticated session.
There may be no immediate signs, as the subscriptions occur silently. However, unexpected messages or notifications from channels you did not join could indicate a problem.
No, the vulnerability does not exfiltrate credentials or establish persistence; it only manipulates subscriptions using the user's authenticated session.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time using your package-lock.json file. You can also check if your application is affected by this vulnerability using the Vulert playground.