Malicious Code Vulnerability in @akapaki/baileys: Unverified Dependency Risks
Summary
MAL-2026-17285: Malicious code in @akapaki/baileys (npm). Affects @akapaki/baileys versions 1.0.0 – 1.0.2. 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 package @akapaki/baileys is an unofficial republish of the Baileys WhatsApp library, designed for developers to interact with the WhatsApp API. It is maintained by an author named 'paki' and lacks a comprehensive README, which raises concerns about its legitimacy and security. The package's dependency on a personal GitHub repository for the 'libsignal' library introduces significant risks, as it allows for unverified code execution during installation.
Vulnerability Detail
The vulnerability stems from the package @akapaki/baileys version 1.0.1, which relies on a GitHub source for its 'libsignal' dependency without a commit SHA, tag, or integrity pin. This means that when users install the package, they may inadvertently execute malicious code contained in the dependency, as it can change at any time without notice. The lack of auditing and control over the code executed during installation poses a severe risk to users' systems and data integrity.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @akapaki/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, users can avoid using the @akapaki/baileys package until a secure version is released. Additionally, consider using the official Baileys library or other verified libraries for WhatsApp API interactions.
Conclusion
The @akapaki/baileys package presents a significant security risk due to its reliance on unverified dependencies, allowing for potential malicious code execution. Users are urged to update or replace the package to safeguard their applications.
See every vulnerability recorded for @akapaki/baileys →
FAQ
The main risk is the potential execution of malicious code from its unverified dependency, which can compromise system security.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Check your application using the Vulert playground at Vulert Scanner.
Yes, you should update to a patched version if available or consider removing the package and using a verified alternative.
If you cannot update or remove the package, ensure that your application is monitored for unusual behavior and consider implementing additional security measures.
Using unverified packages can lead to security vulnerabilities, data breaches, and loss of control over your application's code, making it essential to vet dependencies carefully.