npm

The @jexkcode/baileys npm Malware

Updated 30 Nov 2026 · Incident date 2 Oct 2026

Every published release of the npm package @jexkcode/baileys, a fork of the Baileys WhatsApp library, carries malicious code.

GitHub published malware advisory GHSA-qr3w-xq4p-6575 on 30 November 2026. npm replaced the package with a security holding package the same day.

What happened

GitHub marks the npm package @jexkcode/baileys, a fork of the Baileys WhatsApp library, as malicious code.

  • The package published versions 1.1.4 to 1.3.8, from 2 October 2026 to 26 November 2026.
  • OpenSSF record MAL-2026-18850 credits CyberXYZ and InvisiRisk as finders. It tags the package CWE-506, embedded malicious code.
  • The OpenSSF record states that code in lib/Utils/auto-follow.js sends the WhatsApp w:mex FOLLOW query for channel 120363405612723183@newsletter. It uses the victim's own session when the socket connects. The record ties the package to the PhantomSub family.
  • npm removed the 1.x versions on 30 November 2026, so the code was unavailable for inspection. This page states only what the advisory and registry records report.
  • GitHub lists no patched version.

Affected versions

  • GitHub and OpenSSF list 1.1.4, 1.1.5, 1.2.0 and 1.3.0 to 1.3.8.
  • Both records also list 0.0.0-stage. The registry shows it as an npm placeholder stub from 30 November 2026.
  • 0.0.1-security is the holding package npm published on 30 November 2026. It is not a fix.

Indicators of compromise

  • Package @jexkcode/baileys in package.json, a lockfile or node_modules.
  • A WhatsApp channel follow for 120363405612723183@newsletter, as the OpenSSF record describes.
  • File lib/Utils/auto-follow.js with SHA-256 1be42e76af3018a08068e8d8c257b0a6cb57fa85e74d196e61b8b3a38417c013, from OpenSSF record MAL-2026-18850.

How to check

Run this command in each project folder to list an installed copy.

npm ls @jexkcode/baileys

Search your lockfiles for the package. This command only reads files.

grep -n '@jexkcode/' package-lock.json yarn.lock pnpm-lock.yaml

Check past CI build logs and lockfile history for any install since 2 October 2026. A clean install today cannot rule out earlier exposure.

What to do now

  1. Remove @jexkcode/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 `@jexkcode/baileys` 1.3.8. This version is too new or changed in a way Vigilance must check first.

Example owner report

Bad update

@jexkcode/baileys 1.3.8

The npm package @jexkcode/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

Is @jexkcode/baileys the official Baileys library?

No. It is a separate npm package that forks the Baileys WhatsApp library code. The advisory covers @jexkcode/baileys only.

What did the malicious code do?

The code is not available for inspection because npm removed the 1.x versions. OpenSSF record MAL-2026-18850 says the package follows a WhatsApp channel from the victim's own session. GitHub advisory GHSA-qr3w-xq4p-6575 says to treat any computer that ran the package as fully compromised.

Are the affected versions still on npm?

No. npm removed the 1.x versions and set the latest tag to the security holding version 0.0.1-security on 30 November 2026. Copies in lockfiles or caches can still resolve, so check your projects.

Sources

  1. github.com/advisories/GHSA-qr3w-xq4p-6575
  2. raw.githubusercontent.com/ossf/malicious-packages/main/osv/malicious/npm/@jexkcode/baileys/MAL-2026-18850.json
  3. registry.npmjs.org/@jexkcode%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