This package appears in our research on the malicious Baileys forks, with how it works, the full package list and what to do if you installed it.
Blocked by malware advisory
OpenSSF/OSV malware advisory MAL-2026-18885 identifies this version as malicious and supplies the Firewall block. LPM AI assessed this version as clean; 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-18885 confirms this npm version as malicious.
Advisory
MAL-2026-18885
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in @riyanofficial/baileys (npm)
Details
@riyanofficial/baileys 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 a list downloaded at runtime from https://raw.githubusercontent.com/riyanoffc/ChannelID/refs/heads/main/newsletter.json, 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 clean. That disagrees with the OpenSSF/OSV advisory, which supplies the block.
The install hook only enforces the declared Node.js requirement, and the flagged newsletter identifier is embedded as metadata in event messages routed through an explicit send call. The inspected media network requests support WhatsApp uploads; no malicious behavior was established by the scanner hints.
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
The preinstall hook checks the Node.js version; event and media paths run when the application requests those messaging features.
Impact
No unauthorized collection, account action, or unrelated network destination was identified.
Mechanism
The hook rejects Node.js versions below 20. Event handling constructs a message for the caller-provided recipient, while media uploads use the WhatsApp media connection’s hosts and authentication.
Independent scan evidence
public snapshot
AI called this Clean at 92.0% confidence as Benign with low false-positive risk.
Evidence for AI clean decision
The preinstall hook runs a Node.js version check and exits for versions below 20.
The hard-coded newsletter ID appears in event-message metadata, and the helper is called through the send-message path for event content.
Media uploads use hosts and authentication returned by the WhatsApp media connection, consistent with the package’s messaging purpose.
Importing the main entry prints package attribution and exports the library.
Evidence against
The package has a preinstall lifecycle script, but its inspected body only checks the Node.js version.
Event messages include a hard-coded newsletter identifier, but the inspected code uses it as forwarded-message metadata rather than sending a message to that newsletter.
Behavioral surface
SourceChild process · Crypto · Filesystem · Network · Shell · Web socket
Avoid installing @riyanofficial/baileys@4.0.0. 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.