Every published release of the npm package @randev404/baileys, a fork of the Baileys WhatsApp library, is marked as malware.
GitHub published malware advisory GHSA-ghh3-pr6h-wmpw on 27 November 2026. npm replaced the package with a security holding package the same day.
What happened
GitHub marks the npm package @randev404/baileys, a fork of the Baileys WhatsApp library, as malicious code.
- The npm registry lists seven published versions, from
1.0.0on 19 October 2026 to2.1.1on 26 November 2026. - OpenSSF record MAL-2026-18878 states that code in
lib/custom.jssends the WhatsApp w:mex FOLLOW query for channel ID120363424153860594@newsletterwhen the socket connects. It uses the victim's authenticated session and does not tell the user. - The OpenSSF record ties the behavior to the PhantomSub family, MAL-2026-17342, and credits CyberXYZ as finder.
- npm replaced the tarballs with the holding versions
0.0.0-stageand0.0.1-securityon 27 November 2026, so the code was unavailable for inspection. This page states only what the advisory and registry records report. - The advisory range starts at
0and lists no fixed version.
Affected versions
- The advisory covers every version, from
1.0.0to2.1.1. OpenSSF record MAL-2026-18878 lists1.0.0as affected. - The npm registry no longer serves any original release.
0.0.1-securityis the holding package npm published on 27 November 2026. It is not a fix.
Indicators of compromise
- Package
@randev404/baileysinpackage.json, a lockfile ornode_modules. - A WhatsApp channel follow for JID
120363424153860594@newsletter, as the OpenSSF record describes. - OpenSSF record MAL-2026-18878 lists
lib/custom.jswith SHA-256a4c955ff91009bdfd6836a1dd06a30fd0f72f86ce97d3ef81bb70725a8817d37.
How to check
Run this command in each project folder to list an installed copy.
npm ls @randev404/baileys
Search your lockfiles for the package. This command only reads files.
grep -n '@randev404/' package-lock.json yarn.lock pnpm-lock.yaml
Check past CI build logs and lockfile history for any install since 19 October 2026. A clean install today cannot rule out earlier exposure.
What to do now
- Remove
@randev404/baileysfrom the project and from its lockfile. - Treat any computer that installed or ran the package as fully compromised, as the GitHub advisory states.
- Rotate every secret and key on that computer. Do it from a different computer.
- The advisory warns that removing the package cannot guarantee removal of all malicious software it installed. Rebuild the machine from a clean image.
What Vigilance would show
These examples show an install hold and the corresponding owner report.
Example install message
Vigilance blocked `@randev404/baileys` 2.1.1. This version is too new or changed in a way Vigilance must check first.
Example owner report
Bad update
@randev404/baileys 2.1.1
The npm package @randev404/baileys used the installer's WhatsApp session to follow a channel the publisher chose, without telling the user.
No security team? See who reads the alert.
Frequently asked questions
What did the malicious code do?
The code is not available for inspection because npm removed the tarballs. OpenSSF record MAL-2026-18878 says the package followed one WhatsApp channel from the victim's own session and hid the action. GitHub advisory GHSA-ghh3-pr6h-wmpw says to treat any computer that ran the package as fully compromised.
Does npm still serve the package?
No. npm holds the name and serves only the holding versions 0.0.0-stage and 0.0.1-security. Every original release is gone from the registry.
Is the real Baileys library affected?
No. The advisory covers the npm fork @randev404/baileys only. Other Baileys forks appear in their own records, including @poucode/baileys and @elfhkry666/baileys.
Sources
Send this page to the person who looks after AI at your company.