npm

The @randev404/baileys npm Malware

Updated 27 Nov 2026 · Incident date 19 Oct 2026

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.0 on 19 October 2026 to 2.1.1 on 26 November 2026.
  • OpenSSF record MAL-2026-18878 states that code in lib/custom.js sends the WhatsApp w:mex FOLLOW query for channel ID 120363424153860594@newsletter when 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-stage and 0.0.1-security on 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 0 and lists no fixed version.

Affected versions

  • The advisory covers every version, from 1.0.0 to 2.1.1. OpenSSF record MAL-2026-18878 lists 1.0.0 as affected.
  • The npm registry no longer serves any original release. 0.0.1-security is the holding package npm published on 27 November 2026. It is not a fix.

Indicators of compromise

  • Package @randev404/baileys in package.json, a lockfile or node_modules.
  • A WhatsApp channel follow for JID 120363424153860594@newsletter, as the OpenSSF record describes.
  • OpenSSF record MAL-2026-18878 lists lib/custom.js with SHA-256 a4c955ff91009bdfd6836a1dd06a30fd0f72f86ce97d3ef81bb70725a8817d37.

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

  1. Remove @randev404/baileys from the project and from its lockfile.
  2. Treat any computer that installed or ran the package as fully compromised, as the GitHub advisory states.
  3. Rotate every secret and key on that computer. Do it from a different computer.
  4. 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.

See what to do now.

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

  1. github.com/advisories/GHSA-ghh3-pr6h-wmpw
  2. osv.dev/vulnerability/MAL-2026-18878
  3. registry.npmjs.org/@randev404%2Fbaileys

Send this page to the person who looks after AI at your company.

Email it

More supply chain attacks

All 202 attacks in the library · npm supply chain attacks · How to prevent supply chain attacks

Check the next update before you install it

Vigilance compares the version you trust with the new one. It names the one file that gained a power the old version did not have.

Start freeBrowse the attack library