npm

The @elfhkry666/baileys npm Malware

Updated 27 Nov 2026 · Incident date 20 Oct 2026

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

GitHub published malware advisory GHSA-hj86-h9x2-wvwf on 27 November 2026. npm replaced the package with a security holding package the same day.

What happened

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

  • The package published versions 0.3.20 to 0.3.28, from 20 October 2026 to 2 November 2026.
  • OpenSSF record MAL-2026-18825 mirrors the advisory and tags it CWE-506, embedded malicious code. The record credits CyberXYZ as finder.
  • The OpenSSF record states that code in lib/Socket/newsletter.js sends the WhatsApp w:mex FOLLOW query for channel IDs 120363408893263957@newsletter, 120363413381964356@newsletter and 120363421368454744@newsletter, stored as base64 strings. It uses the victim's authenticated session. The record ties the package to the PhantomSub family.
  • npm replaced the tarballs with the security holding version 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.
  • GitHub lists no patched version.

Affected versions

  • The advisory range starts at 0. OpenSSF record MAL-2026-18825 names versions 0.3.20 to 0.3.27 as affected.
  • The npm registry lists nine published versions, from 0.3.20 on 20 October 2026 to 0.3.28 on 2 November 2026.
  • 0.0.1-security is the holding package npm published on 27 November 2026. It is not a fix.

Indicators of compromise

  • Package @elfhkry666/baileys in package.json, a lockfile or node_modules.
  • A WhatsApp channel follow for JID 120363408893263957@newsletter, 120363413381964356@newsletter or 120363421368454744@newsletter, as the OpenSSF record describes.
  • OpenSSF record MAL-2026-18825 lists four SHA-256 digests for lib/Socket/newsletter.js: 4bbd58b7071236c9d63a369c417d359381828f13857d737a20edb151c369613e, 5517ebf3a4b7b0778a224d1bbc32c8801fb341d0fe0eb9dc7ed869bd35f50ddd, 95d5784fd1d5297be08e9dabc60fa96cee2b52525fffae7e26716e0fb27bd43a and bf08b5afcbea3e45f98680538cb64b4043f43219b59d42f7361fba84a67390e5.

How to check

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

npm ls @elfhkry666/baileys

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

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

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

What to do now

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

Example owner report

Bad update

@elfhkry666/baileys 0.3.27

The npm package @elfhkry666/baileys used the installer's WhatsApp session to follow channels the publisher chose, without telling the user.

See what to do now.

No security team? See who reads the alert.

Frequently asked questions

Is @elfhkry666/baileys the official Baileys library?

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

What did the malicious code do?

The code is not available for inspection because npm removed the tarballs and published a security holding package. OpenSSF record MAL-2026-18825 says the package follows three WhatsApp channels from the victim's own session. GitHub advisory GHSA-hj86-h9x2-wvwf says to treat any computer that ran the package as fully compromised.

Can I still install the affected versions?

No. npm replaced the latest tag with the security holding version 0.0.1-security on 27 November 2026. Copies already in lockfiles or caches can still resolve, so check your projects.

Sources

  1. github.com/advisories/GHSA-hj86-h9x2-wvwf
  2. api.osv.dev/v1/vulns/MAL-2026-18825
  3. registry.npmjs.org/@elfhkry666%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