A WebSockets library for interacting with WhatsApp Web
This report shows the evidence for @pahinak/bails@1.1.1, the only known version.
Blocked by malware advisory
OpenSSF/OSV malware advisory MAL-2026-18871 identifies this version as malicious and supplies the Firewall block. LPM AI assessed this version as suspicious; the assessments disagree.
What to do: remove this version and, if it ran, rotate the credentials it could reach. Remediation↓
OpenSSF/OSV malicious advisory
published · by OpenSSF/OSV
OpenSSF/OSV advisory MAL-2026-18871 confirms this npm version as malicious.
Advisory
MAL-2026-18871
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in @pahinak/bails (npm)
Details
@pahinak/bails is a fork of the Baileys WhatsApp Web library that silently subscribes the installer's own WhatsApp account to WhatsApp Channels chosen by the publisher. When the socket connects, code in lib/Socket/newsletter.js sends the WhatsApp w:mex FOLLOW query for the channel ID(s) 120363349140729983@newsletter, 120363410018949906@newsletter, 120363424800295266@newsletter, 120363425177067841@newsletter, 120363425869049995@newsletter, 120363428745722504@newsletter (stored as base64 strings), using the victim's authenticated session and without telling them. Same behaviour as the PhantomSub family (MAL-2026-17342).
LPM's AI review found this version suspicious. That disagrees with the OpenSSF/OSV advisory, which supplies the block.
The install hook only enforces a Node version, but custom send helpers add hard-coded forwarded-newsletter attribution to outgoing messages. This creates a real risk of misleading recipients, though the inspected code does not automatically act on the named newsletter account.
Static reason
One or more suspicious static signals were detected.; source matched previously finalized malicious package; routed for review; source fingerprint signature matched known malicious package; routed for review
Trigger
An application calls sendMessage with an eventMessage or albumMessage.
Impact
Recipients may see misleading attribution that the package user did not specify. No automatic post to the named newsletter was identified.
Mechanism
The helper inserts newsletter and sender metadata into the message before relaying it to the caller-supplied recipient.
Evidence
lib/Socket/messages-send.jslib/Socket/luxu.js
Independent scan evidence
public snapshot
AI called this Suspicious at 88.0% confidence as Unknown with medium false-positive risk.
Evidence for AI warning decision
The preinstall hook runs a Node-version check that exits on versions below 20.
sendMessage routes event messages to a custom helper when the application explicitly sends them.
The event helper inserts the hard-coded newsletter ID 120363421563597486@newsletter into forwarded-message metadata, then relays the message to the caller's recipient.
The album helper adds hard-coded forwarded-newsletter metadata and a sender name to outgoing album images.
Evidence against
The inspected install hook does not send data or contact a host.
The newsletter metadata is added while handling an explicitly requested send; the inspected code does not post to or subscribe to the named newsletter automatically.
Behavioral surface
SourceChild process · Crypto · Filesystem · Network · Shell · Web socket
Supply chainHigh entropy strings · URL strings
ManifestGit dependency
Scanned 108 files · 1.80 MB of source
5 external domains referenced
call.whatsapp.com
raw.githubusercontent.com
wa.me
web.whatsapp.com
www.whatsapp.com
Oversized source lightweight scan
WAProto/index.js11.6 MB file, sampled 256 KB
No sampled risky behavior triggered.
Findings
6 high · 5 medium · 6 low
Where they are, most severe file first. Code opens a file's flagged lines, with their evidence, below.
The versions list below shows the verdict for each recorded version.
Avoid installing @pahinak/bails@1.1.1. Remove it from direct dependencies and check your lockfile for transitive copies.
Choose an independently verified alternative or release. This report does not establish that other versions are safe.
If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.