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

@nakanoo/baileys

Latest version: v1.0.1

Overview

Last scanned
16 Nov 2026
Published
16 Nov 2026
AI: Malicious npm package Publisher: randev404
3 Versions

Scan summary

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

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

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.1 LATEST 16 Nov 2026 2 rules fired
1.0.0 16 Nov 2026 1 rule fired
0.0.0-stage 16 Nov 2026 Not shown

Rules fired in 1.0.1: 2

Findings

2 High

Findings for v1.0.1. 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.1; other versions have their own rules, not their own score.

README

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

@nakanoo/baileys

A lightweight WhatsApp Web API library (WebSocket-based, TypeScript) with built-in interactive message builders. Fork of Baileys, made for WhatsApp bots.

node typescript module license version


Table of Contents

  • About
  • Features
  • Requirements
  • Installation
  • Quick Start
  • Pairing Code Login
  • Interactive Message Builders
    • AIRich / ORich
    • ButtonV2
    • Button (list)
    • Carousel
    • Error classes
  • A2UI
  • Rich Message Helpers
  • Sticker Pack
  • Extra Socket Methods
  • Business / Catalog Helpers
  • Default Behavior
  • Project Structure
  • Development
  • Credits & Attribution
  • Disclaimer
  • License

About

@nakanoo/baileys is a fork of Baileys (WhiskeySockets) v7.0.0-rc14, a WebSocket-based TypeScript library for the WhatsApp Web multi-device API. It talks to WhatsApp directly over WebSocket, with no Selenium and no browser, which makes it light on memory and a good fit for WhatsApp bots, automation, and integrations.

All core Baileys functionality is kept (socket, Signal, WABinary, WAUSync, WAM, WAProto, media, auth). On top of that, this fork adds the "nakanoo" modules:

  • interactive message builders with an API surface compatible with NIXCODE / itsukilib,
  • A2UI widgets,
  • rich message helpers,
  • sticker packs,
  • extra socket methods (sendPreview, newsletterMsg).

All added modules were written from scratch (not copied code). See NOTICE.md for details.

Features

Category What you get
Baileys core Multi-device, QR code / pairing code login, auth state, event buffer, groups, communities, newsletters (channels), USync
Message builders AIRich / ORich, Button, ButtonV2, Carousel, Toolkit, BaseBuilder
A2UI A2UI + sendA2UIWidget (card, video, choice picker, image)
Rich messages tokenizeCode(V2), generateTableContent(V2), generateListContent, generateCodeBlockContent(V2), generateLinkContent(V2), and more
Sticker pack makeStickerPack
Extra socket sendPreview, newsletterMsg via patchExtraSocket
Business uploadingNecessaryImages, uploadingNecessaryImagesOfProduct
Dual build ESM (lib/) and a CommonJS wrapper (cjs/)

Requirements

  • Node.js ≥ 20
  • To use it through require() (CommonJS): Node ≥ 20.19 or ≥ 22.12, because the CJS entry relies on Node's native require(ESM). Dependencies such as whatsapp-rust-bridge and p-queue ship no CJS build.
  • Package manager for development: Yarn 4.9.2 (corepack enable)

Optional peer dependencies, install as needed:

Package Used for
sharp or jimp Image / sticker thumbnails
link-preview-js High-quality link previews
audio-decode Voice note waveforms

Installation

# from npm (if published)
npm install @nakanoo/baileys

# from a tarball created with `npm pack`
npm install ./nakanoo-baileys-1.0.0.tgz

Quick Start

ESM
import makeWASocket, {
  useMultiFileAuthState,
  fetchLatestBaileysVersion,
  DisconnectReason,
  makeCacheableSignalKeyStore
} from '@nakanoo/baileys'
import pino from 'pino'

const logger = pino({ level: 'silent' })

async function start() {
  const { state, saveCreds } = await useMultiFileAuthState('auth_info')
  const { version } = await fetchLatestBaileysVersion()

  const sock = makeWASocket({
    version,
    logger,
    auth: {
      creds: state.creds,
      keys: makeCacheableSignalKeyStore(state.keys, logger)
    }
  })

  sock.ev.on('creds.update', saveCreds)

  sock.ev.on('connection.update', ({ connection, lastDisconnect }) => {
    if (connection === 'close') {
      const code = lastDisconnect?.error?.output?.statusCode
      if (code !== DisconnectReason.loggedOut) start()
    }
  })

  sock.ev.on('messages.upsert', async ({ messages, type }) => {
    if (type !== 'notify') return
    for (const msg of messages) {
      const text = msg.message?.conversation || msg.message?.extendedTextMessage?.text
      if (text === 'ping') {
        await sock.sendMessage(msg.key.remoteJid, { text: 'pong' }, { quoted: msg })
      }
    }
  })
}

start()
CommonJS
const { default: makeWASocket, useMultiFileAuthState } = require('@nakanoo/baileys')

Other named exports (AIRich, Utils, proto, etc.) are also available through require, along with the Utils, Types, Defaults, WABinary, WAM, and WAUSync namespaces.

Pairing Code Login

if (!sock.authState.creds.registered) {
  const code = await sock.requestPairingCode('628xxxxxxxxxx')
  console.log('Pairing code:', code)
}

If you do not pass a second argument (custom code), the library uses customConfig.pairingCode from src/custom.ts. See Default Behavior.

Interactive Message Builders

Every builder accepts an optional sock in its constructor. Without sock you can still call .build() to get the message content. With sock you can use .send(jid).

AIRich / ORich

ORich is an alias of AIRich.

import { AIRich } from '@nakanoo/baileys'

const rich = new AIRich(sock)
  .addText('Hello, this is a rich message!')
  .addCode('const x = 1', 'js')
  .addTable({ headers: ['Name', 'Score'], values: [['Ana', 10], ['Budi', 8]] })
  .addSource({ title: 'Documentation', url: 'https://baileys.wiki' })
  .addTip('Remember to drink water')
  .createAlert('info', 'This is an alert example')
  .setFooter('nakanoo/baileys')

await rich.send(jid, { quoted: msg })

Available methods:

Method Purpose
addText(text) Append text (joined with newlines)
addCode(code, language = 'js') Fenced code block
addTable({ headers?, values }) Simple text table
addImage(input) / addVideo(input) Media attachments (requires sock)
addSection(title, items?) Section
addSource({ title, url? }) Source / reference
addTip(text) Tip marked with 💡
createAlert('info' \| 'warn' \| 'error', text) Alert marked with ℹ️ / ⚠️ / ⛔
addSuggest(text) Quick reply button
addFooterAction({ text, url }) URL button in the footer
addFOAText, addProduct, addWidget, addReels, addPost, addMetadata, addSubmessage Extra metadata
assignId(id?), getIds(), hasId(id) ID management
setResponseId, setBotResponseId, refreshResponseId, refreshBotResponseId Response IDs
tokenizer() Simple code tokenizer
toTableMetadata() Table metadata
newLayout() Reset sections, widgets, and media
build() Produce the message content
send(jid, options?) Build, then send via relayMessage
sendEdit(jid, key) / buildEdit(jid, key) Edit an already sent message
delete(jid, key) Delete (revoke) a message

The result of build() depends on what the builder contains:

  • with suggestions or footer actions, it returns an interactiveMessage (native flow),
  • with only media, it returns an image / video message with a caption,
  • otherwise, it returns an extendedTextMessage.
ButtonV2

Native flow interactive message with several button types.

import { ButtonV2 } from '@nakanoo/baileys'

await new ButtonV2(sock)
  .addText('Choose one:')
  .addQuickReply('Yes', 'btn_yes')
  .addUrl('Open Website', 'https://example.com')
  .addCall('Call us', '+628123456789')
  .addCopy('Copy Code', 'CODE123')
  .setFooter('nakanoo')
  .send(jid)
Button (list)

List message (single select).

import { Button } from '@nakanoo/baileys'

await new Button(sock)
  .title('Menu')
  .subtitle('Pick an item')
  .addRow('menu_1', 'Bot Info', 'View bot info')
  .addRow('menu_2', 'Help')
  .send(jid)
Carousel
import { Carousel } from '@nakanoo/baileys'

const carousel = new Carousel(sock)
  .addCard({ title: 'Card 1', text: 'First card body', image: imageMessage })
  .addCard({ title: 'Card 2', text: 'Second card body', image: imageMessage })
  .setFooter('swipe to see more')

await carousel.send(jid)
Error classes

AIRichError, ItemNotFoundError, DuplicateIdError, InvalidTargetError, ContentValidationError. All extend AIRichError and expose a code property (for example DUPLICATE_ID).

try {
  await new ButtonV2().build() // no buttons
} catch (e) {
  if (e instanceof ContentValidationError) console.log(e.code) // CONTENT_VALIDATION
}

A2UI

Collect widgets, then render them into a message.

import { A2UI, sendA2UIWidget } from '@nakanoo/baileys'

const ui = new A2UI('Title')
  .addCard('Card', 'Card body')
  .addChoicePicker('Pick an option', [
    { label: 'Option A', id: 'a' },
    { label: 'Option B', id: 'b' }
  ])

await sendA2UIWidget(sock, jid, { a2ui: ui, quoted: msg })

Rendering rules:

  • if the first widget is a choicePicker, it becomes a listMessage,
  • cards with a url become cta_url buttons inside an interactiveMessage,
  • anything else becomes plain text.

Rich Message Helpers

Functions exported from Utils:

Function Description
tokenizeCode(lang, code) Split code into lines
tokenizeCodeV2(lang, code) Per line, with keyword flags (JS/TS, Python, Go, Lua, Bash)
generateTableContent(V2) Table as text
toTableMetadataV2 Table metadata (headers, rows, colCount, rowCount)
generateListContent Single-select listMessage
generateCodeBlockContent(V2) Fenced code block
generateLinkContent(V2) Text + link
generateLatexContent LaTeX content as a text block
generateRichMessageContent extendedTextMessage with context info
prepareRichResponseMessage Prepare and send content via relayMessage
buildBotForwardedMessage, buildRichContextInfo Forwarded message and context info
RichSubMessageType, CodeHighlightType Enums

Sticker Pack

import { makeStickerPack } from '@nakanoo/baileys'

await makeStickerPack(sock, jid, {
  packname: 'My Pack',
  author: 'nakanoo',
  stickers: [
    { image: { url: './s1.webp' }, emojis: ['😀'] },
    { image: { url: './s2.webp' }, emojis: ['😎'] }
  ]
}, { quoted: msg })

Extra Socket Methods

sendPreview and newsletterMsg are not attached automatically. Call patchExtraSocket once after creating the socket (it is safe to call more than once).

import makeWASocket, { patchExtraSocket } from '@nakanoo/baileys'

const sock = makeWASocket({ /* ... */ })
patchExtraSocket(sock)

// send a custom link preview
const id = await sock.sendPreview(jid, {
  caption: 'Check this out',
  url: 'https://example.com',
  title: 'Preview Title',
  description: 'Preview description',
  jpegThumbnail: buffer
})

// normalized channel (newsletter) info
const info = await sock.newsletterMsg('120363xxxxxxxxxx@newsletter')
// { id, state, thread_metadata: { name, creation_time, subscribers_count, verification } }

Business / Catalog Helpers

import { uploadingNecessaryImages, uploadingNecessaryImagesOfProduct } from '@nakanoo/baileys'

const prepared = await uploadingNecessaryImages(sock, products)
const one = await uploadingNecessaryImagesOfProduct(sock, products[0])

Products without images are skipped, and a failed image upload does not stop the other products.

Default Behavior

This fork ships with a few default behaviors defined in src/custom.ts and src/Socket/index.ts. Read this section before using it in production.

Behavior Default Notes
ASCII banner Enabled Printed once, the first time makeWASocket() is called
Custom pairing code RANDEV12 Used by requestPairingCode(phone) when you do not pass your own code
Auto-follow channels Enabled After the connection reaches open (once per process), the socket follows the channels listed in newsletterIds

To change or disable them, edit customConfig in src/custom.ts and rebuild:

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 @nakanoo/baileys

References

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

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

PHP2Shell, Day 5 93.6% of Measurable Instances Still Unpatched (1)
Vulnerability Insights

PHP2Shell, Day 5: The Panic Hasn’t Turned Into Patching

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Copy of Template Design OX Blog (2)
Research

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

Frame 2085668439 (1)
Group 1261154229