Skip to main content

Malicious code in @modss/baileys (npm)

0
High
Published: 09/03/2026 (09/03/2026, 18:09:54 UTC)
Source: GCVE Database
Product: @modss/baileys

Description

@modss/baileys is a maliciously modified fork of the Baileys WhatsApp Web library that automatically follows publisher-controlled WhatsApp channels at runtime. It fetches a remote list of newsletter IDs from a GitHub URL and issues follow commands on the user's authenticated WhatsApp session without user consent. This behavior is embedded in all published versions of the package. No credential or session key theft was observed, but the package grants an attacker control over the WhatsApp session's follow actions. The package should be considered fully compromised and removed immediately.

Affected software

npmghsa
@modss/baileys
Affected versions
=1.0.0=1.0.1=1.0.2

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/12/2026, 22:02:53 UTC

Technical Analysis

@modss/baileys is a renamed fork of the Baileys WhatsApp Web library published in early September 2026. It contains malicious code in lib/Socket/newsletter.js that sets a URL pointing to a GitHub-hosted JSON list of newsletter IDs. Upon each connection update where the connection is 'open', the package fetches this list and automatically issues follow commands (executeWMexQuery FOLLOW) for each ID on the user's authenticated WhatsApp session. The followed IDs are cached locally. The list is controlled by the attacker and can be updated dynamically without redeploying the package. The package aliases its libsignal dependency under a new name but without malicious content. No credential or session key theft was detected, and the remote URL was not requested during analysis. The package is considered fully compromised, and any system running it should be treated as compromised.

Potential Impact

The package grants an attacker the ability to control the WhatsApp session's follow actions by automatically following attacker-controlled channels. This can lead to unauthorized actions on the user's WhatsApp account. Although no credential or session key theft was observed, the presence of this malicious code means the system running the package is fully compromised. Secrets and keys stored on the affected system should be rotated immediately. Removing the package alone may not remove all malicious software resulting from its installation.

Mitigation Recommendations

The package should be removed immediately from any affected system. All secrets and keys stored on the compromised system should be rotated from a different, trusted computer. Because the package grants full control over the system, assume full compromise and perform a thorough incident response. There is no official patch or fix available. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-15918
Osv Schema Version
1.7.4
Aliases
["GHSA-4c9v-m7qm-2mpr"]
Ecosystems
["npm"]

Threat ID: 6acd555f2cdf04f656da86aa

Added to database: 10/12/2026, 21:47:11 UTC

Last enriched: 10/12/2026, 22:02:53 UTC

Last updated: 10/12/2026, 22:02:53 UTC

Views: 1

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses