Skip to main content

Malicious code in baileys-mbuilder (npm)

0
Critical
Published: 08/26/2026 (08/26/2026, 13:28:03 UTC)
Source: GCVE Database
Product: baileys-mbuilder

Description

The baileys-mbuilder npm package contains heavily obfuscated malicious code executed both during installation and runtime. The package's postinstall script runs a large JSFuck-encoded payload that downloads and dynamically updates remote JavaScript code without transparent integrity verification. This behavior effectively gives an attacker full control over any system where the package is installed. Removal of the package does not guarantee elimination of all malicious components, and all secrets on affected systems should be considered compromised and rotated immediately.

Affected software

npmghsa
baileys-mbuilder

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: 09/10/2026, 11:25:24 UTC

Technical Analysis

The baileys-mbuilder npm package includes a postinstall script executing a ~6.3 MB JSFuck-style obfuscated JavaScript payload that reconstructs and runs code via eval. This payload downloads a remote MessageBuilder.js module and periodically fetches updates, dynamically importing new code if hashes differ. The obfuscation hides the fetch destination and integrity checks, preventing static analysis. Both installation and runtime require executing this malicious code, effectively compromising the host system. The package's design allows an attacker to maintain persistent, dynamic code execution on affected machines.

Potential Impact

Any system with this package installed or running is considered fully compromised. Attackers potentially gain full control over the machine, enabling theft or manipulation of secrets, credentials, and keys. Because the package dynamically fetches and executes remote code, the attacker can update payloads post-installation. Removing the package alone may not remove all malicious artifacts, so all secrets on the system should be rotated from a clean environment.

Mitigation Recommendations

Immediate removal of the baileys-mbuilder package is recommended. However, due to the high likelihood of full system compromise, all secrets and keys stored on the affected machine must be rotated from a separate, trusted system. Monitor for any signs of persistent malicious activity. No official patch or fix is available; the package itself is malicious and should be avoided entirely.

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-14529
Osv Schema Version
1.7.4
Aliases
["GHSA-8m87-xx52-4rjw"]
Ecosystems
["npm"]

Threat ID: 6a8effd3acd9273b490771bd

Added to database: 08/26/2026, 15:01:39 UTC

Last enriched: 09/10/2026, 11:25:24 UTC

Last updated: 10/02/2026, 14:27:38 UTC

Views: 25

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