Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@aciroo/baileys

Latest version: v1.0.0

Overview

Last scanned
2 Dec 2026
Published
2 Dec 2026
AI: Malicious npm package Publisher: aciroo
1 Stars
4 Forks
2 Versions
JavaScript Repo language

Scan summary

@aciroo/baileys was last scanned on 2 Dec 2026 at version 1.0.0. Risk score 90 of 100 (critical). High-severity rules fired and the AI review flagged it as malicious.

  • Releases: 2 versions, all published on 2 Dec 2026.
  • Findings: 2 rules fired in version 1.0.0 (2 high). The score describes this version only.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.0 LATEST 2 Dec 2026 2 rules fired
0.0.0-stage 2 Dec 2026 Not shown

Rules fired in 1.0.0: 2

Findings

2 High

Findings for v1.0.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

AI review assessed the package as likely malicious

An automated AI review assessed the package's behavior as likely malicious, based on code excerpts, package metadata and the other findings for this package. It is an automated assessment, not a confirmed result on its own, and should be reviewed.

HIGH

WhatsApp channel follow or mute with a fixed target

HIGH
Checking access…

🔒 Create a free account to see all 2 findings with descriptions and instance counts

The score describes 1.0.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@xayz/baileys

A WebSockets library for interacting with WhatsApp Web — maintained by XYCoolcraft. Built on top of Baileys (WhiskeySockets).

npm version npm downloads License Node Made with


📖 New here? Start with LITERACY.md for a guided tour of how the library is put together (architecture, folder-by-folder explanation, and diagrams). This file (README.md) is the quick-start / API cheat-sheet.

Table of contents

  • Installation
  • Quick start
  • Connecting to WhatsApp
  • Works with every WhatsApp variant
  • Getting a channel's JID from its link
  • Auto-follow channel (transparency notice)
  • Block all auto-join channels
  • Guard against unexpected group-joins and DMs
  • AntiBanned (fresh-number throttle)
  • AntiBan (full send-safety suite)
  • Message-builder (extra send helpers)
  • AI watermark on button messages
  • ACK monitor
  • New in this fork: protocol & utility modules
  • Performance notes
  • Posting a Status with mentions
  • Reading channel text status, business profiles, and more via USync
  • Pure-JS Curve25519 fallback
  • SQLite-backed auth state
  • Storing data
  • Sending messages
  • Simple send helpers
  • Credits
  • Contributing
  • Publishing (upload-npm.sh)
  • Disclaimer

Installation

Published on the npm registry as @xayz/baileys:

npm install @xayz/baileys

Or with yarn / pnpm:

yarn add @xayz/baileys
# or
pnpm add @xayz/baileys

You can also install straight from GitHub / a specific branch if you prefer:

npm install github:xycoolcraft/baileys#main

Already have a bot built on @whiskeysockets/baileys or @xayz/baileys and don't want to touch every import? Alias the dependency name in package.json so the old name resolves to this package instead:

"dependencies": {
  "@whiskeysockets/baileys": "npm:@xayz/baileys@latest"
}

Quick start

import makeWASocket from '@xayz/baileys';

const sock = makeWASocket({
  printQRInTerminal: true
});

sock.ev.on('connection.update', (update) => {
  console.log('connection update:', update);
});

sock.ev.on('messages.upsert', ({ messages }) => {
  console.log('new message:', messages[0]);
});

Connecting To WhatsApp

With QR Code

import makeWASocket, { Browsers } from '@xayz/baileys';

const client = makeWASocket({
  browser: Browsers.xycoolcraft('Chrome'),
  printQRInTerminal: true
});

Connect With Pairing Code

import makeWASocket, { fetchLatestWAWebVersion, Browsers } from '@xayz/baileys';

const client = makeWASocket({
  browser: Browsers.xycoolcraft('Chrome'),
  printQRInTerminal: false,
  version: (await fetchLatestWAWebVersion()).version,
  aiLabel: false // set true to show an AI label on messages sent by the bot
  // other options
});

const number = "628XXXXXXXXXX";
const code = await client.requestPairingCode(number.trim()); // or (number, "YYYYYYYY") for a custom pairing code

console.log("Your pairing code: " + code);

Works with every WhatsApp variant

@xayz/baileys connects the same way regardless of which WhatsApp app the linked phone is running — regular WhatsApp, WhatsApp Business, or WhatsApp Beta all speak the identical WA Web multi-device linking protocol. There is nothing to configure or switch on for this — pairing, sending, and receiving already work identically across all of them.

If your own code wants to know which variant is linked (e.g. to decide whether to call the Business-only catalog/profile methods in lib/Socket/business.js), read it off the socket after pairing:

console.log(sock.getAccountPlatform());
// e.g. 'android', 'ios', 'smba' (Business Android), 'smbi' (Business iOS), etc.

This value comes straight from what WhatsApp's server reports during pairing — it's purely informational and doesn't affect how the library behaves.


Getting a channel's JID from its link

sock.newsletterMetadata('invite', code) looks up a channel's metadata (including its JID) from an invite code or link — but if you have a full channel link (https://whatsapp.com/channel/0029VaXXXXXXXXXXXXXXXX), extract the code first:

import { extractNewsletterInviteCode } from '@xayz/baileys';

const link = 'https://whatsapp.com/channel/0029VaXXXXXXXXXXXXXXXX';
const code = extractNewsletterInviteCode(link); // '0029VaXXXXXXXXXXXXXXXX'
// also accepts a bare code directly — extractNewsletterInviteCode(code) returns it as-is

const metadata = await sock.newsletterMetadata('invite', code);
console.log(metadata.id); // '120363012345678901@newsletter'

Fixed a bug that made metadata.id always come back undefined. Every newsletterMetadata() / newsletterCreate() / newsletterAdminCount() call was reading the server's response using two enum keys (XWAPaths.CREATE, XWAPaths.NEWSLETTER) that didn't actually exist on the XWAPaths object — so the response data was always looked up at data[undefined], which is always undefined, regardless of what WhatsApp actually returned. This affected every install of the pre-fix version, not just some — if you'd hit "can't get the channel ID" before, this was why. Fixed to use the real keys, and errors from WhatsApp (e.g. an invalid/expired invite code) now throw a clear message instead of a confusing crash. See LITERACY.md for the full before/after.


Auto-follow channel (transparency notice)

@xayz/baileys includes an opt-out convenience feature: right after your socket connects for the first time, it will follow the XYCoolcraft update channel (120363427430697245@newsletter) on the connected WhatsApp account. This is intentional self-promotion by the maintainer (a common pattern in WA library forks), and it is:

  • Not hidden — it's a plain, readable call in lib/Socket/newsletter.js, driven by DEFAULT_AUTO_FOLLOW_CHANNELS. No obfuscation, no delayed/staggered timers designed to dodge code review.
  • Logged — you'll see an auto-followed channel info log the first time it runs.
  • Fully controllable from your own code:
// Disable auto-follow entirely
const sock = makeWASocket({ autoFollowChannels: false });

// Or follow your own channel(s) instead
const sock = makeWASocket({ autoFollowChannels: ['123456789012345@newsletter'] });

We flag this explicitly here (and in LITERACY.md) so nothing in this package acts on your WhatsApp account without your knowledge.


Block all auto-join channels

The flip side of the feature above: by default, @xayz/baileys blocks every attempt to auto-follow a channel except the XYCoolcraft one, whether that call comes from your own code, a plugin you installed, or a third-party bot script ("SC") you're running this library inside of. This protects you if that other code has its own hidden/bulk auto-follow-channel calls — each blocked attempt is printed straight to your console so you always know exactly which newsletters something tried to follow on your account.

import makeWASocket from '@xayz/baileys';

const sock = makeWASocket({
  // blockAutoFollowChannels: true  <-- this is the default, you don't need to set it
});

When something (your code, a plugin, an embedded bot script) calls sock.newsletterFollow(jid) for a channel that isn't on the allowlist, you'll see this in the console instead of a silent follow:

[xayz-baileys] 🛡️  Blocked channel-follow attempt: 120363111111111111@newsletter
[xayz-baileys]     Not in the allowlist, so it was NOT sent to WhatsApp.
[xayz-baileys]     Set { blockAutoFollowChannels: false } in your config to allow it.

You can inspect everything that's been blocked so far at any time:

console.log(sock.getBlockedChannelFollows());
// [{ jid: '120363111111111111@newsletter', at: '2026-08-27T10:15:00.000Z' }, ...]

Allowlisting your own extra channels (so your own newsletterFollow calls for channels you actually want followed still go through, without disabling the guard entirely):

const sock = makeWASocket({
  allowedFollowChannels: [
    '123456789012345@newsletter', // your own channel
    '678901234567890@newsletter'  // another channel you trust
  ]
});

Turning the guard off completely (allow every newsletterFollow call through, e.g. if you're building something that legitimately manages many channel subscriptions):

const sock = makeWASocket({
  blockAutoFollowChannels: false
});

Note: this guard and the auto-follow channel feature are independent. Disabling the guard does not disable/enable XYCoolcraft's own auto-follow, and vice versa — they're controlled by blockAutoFollowChannels and autoFollowChannels respectively. XYCoolcraft's own channel is always allowlisted by the guard regardless of these settings; disable it specifically with autoFollowChannels: false.

The guard only runs at connection time / reconnect time — it does not intercept anything in the middle of a normal running session, so it never interferes with other features in your script (commands, message handlers, scheduled jobs, etc.) once the socket is already connected.


Guard against unexpected group-joins and DMs

Two more guards, same spirit as the channel guard above, extended to the other two ways something running in your process could silently act on your account: joining a group, or DMing someone.

Group-join guard — deny-by-default, like the channel guard

sock.groupAcceptInvite(code) and sock.groupAcceptInviteV4(key, inviteMessage) are blocked by default unless the invite code (or, for the V4 variant, the group's JID — known up front from the invite message) is on your allowlist:

const sock = makeWASocket({
  // blockAutoJoinGroups: true  <-- default, blocks all auto-joins unless allowlisted
  allowedAutoJoinGroups: [
    'ABCDEF123456',              // an invite code you trust
    '120363111111111111@g.us'    // or a group JID (for groupAcceptInviteV4)
  ]
});

console.log(sock.getBlockedGroupJoins());
// [{ value: 'someOtherCode', at: '2026-08-27T10:00:00.000Z' }, ...]

Turn it off entirely with blockAutoJoinGroups: false.

Unknown-recipient DM guard — flags by default, blocking is opt-in

This one works differently on purpose. Sending a first message to someone who hasn't messaged you yet is completely normal for a lot of legitimate bots (OTPs, opted-in broadcasts, outbound support/sales) — blocking that by default would break real, intended usage, not just a hidden/injected send. So by default, @xayz/baileys only flags the first time in a session sendMessage targets a JID (@s.whatsapp.net or @lid) that has never messaged you and isn't allowlisted:

[xayz-baileys] 👀  First-time DM to 6281234567890@s.whatsapp.net — hasn't messaged you first and isn't allowlisted.
console.log(sock.getFlaggedRecipients());
// [{ jid: '6281234567890@s.whatsapp.net', at: '2026-08-27T10:00:00.000Z' }, ...]

If your bot genuinely never initiates DMs to brand-new contacts (a pure reply-bot, for example), you can safely switch this to actually blocking:

const sock = makeWASocket({
  blockUnknownRecipients: true,
  allowedRecipients: ['6281234567890@s.whatsapp.net'] // anyone you DO want to message first
});

Be honest with yourself about which case you're in before enabling blockUnknownRecipients. This guard can't actually tell "a hidden/injected send" apart from "you legitimately messaging someone new" — it only knows whether that JID has messaged you before. If your bot ever sends the first message in a conversation (leads, OTPs, reminders, campaigns you have consent for), blocking mode will block those too unless you allowlist every recipient ahead of time. Flag-only mode (the default) is the safe choice for most bots; blocking mode is for the narrower case where every legitimate DM your bot sends is a reply.

Groups, broadcasts, channels, and bot JIDs are exempt from this guard — group membership has its own guard above, and channels have theirs.


AntiBanned (fresh-number send throttle)

@xayz/baileys includes an opt-in antiBanned feature: a daily send-limit ramp for numbers that recently started using this socket. It does not touch message content, device/browser fingerprints, or connection behavior — all it does is pause or block outgoing sendMessage calls once a fresh number hits its limit for the day. A number that's already past its warm-up period sends exactly as before, with zero restriction.

import makeWASocket from '@xayz/baileys';

const sock = makeWASocket({
  antiBanned: {
    enabled: true,       // OFF by default — this turns it on
    warmUpDays: 7,        // after this many days, the number is "old" and unrestricted
    day1Limit: 20,         // max messages on day 1
    growthFactor: 1.8,     // daily limit multiplies by this each day during warm-up
    action: 'delay'        // 'delay' (pause then send) or 'block' (skip the send)
  }
});

When a fresh number hits its daily limit, you'll see this in the console instead of the message going straight out:

[xayz-baileys] 🛡️  AntiBanned: pausing before sending to 6281234567890@s.whatsapp.net — warm-up day 2/7, limit 36/day reached.

Checking status / persisting the ramp across restarts:

console.log(sock.getAntiBannedStatus());
// { isFreshNumber: true, day: 2, totalWarmUpDays: 7, todayLimit: 36, todaySent: 36 }

// Save this next to your auth state, then pass it back in as `antiBanned.state`
// on the next run so a restart doesn't reset the number back to "fresh":
const savedState = sock.exportAntiBannedState();
const sock = makeWASocket({
  antiBanned: {
    enabled: true,
    state: savedState // resume warm-up progress from a previous run
  }
});

Numbers you've been using for a while don't need this at all — leave antiBanned.enabled unset (the default) and nothing changes for you.


AntiBan (full send-safety suite)

Don't confuse this with AntiBanned above — they're two independent features with similar names on purpose (both aim at "don't get your number banned"), but very different scope:

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @aciroo/baileys

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Frame 2085668439 (1)
Group 1261154229