baileys-mbuilder@4.5.0-custom
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.
OpenSSF/OSV Malicious Advisory
imported 2mo ago · by OpenSSF/OSVOpenSSF/OSV advisory MAL-2026-14529 confirms this npm version as malicious.
Advisory
MAL-2026-14529
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in baileys-mbuilder (npm)
Details
package.json declares `"postinstall": "node lib/index.js --install"`, and lib/index.js is a single ~6.3 MB JSFuck-style eval() expression that reconstructs its source character-by-character from boolean/array coercions and %-unescape. The same file is the package's `main`, and lib/index.mjs re-requires it, so both `npm install` and any subsequent `require`/`import` of the package execute the obfuscated payload. The README documents that the postinstall step downloads MessageBuilder.js from a remote repository and that `MB.enableAutoUpdate(ms, cb)` periodically re-fetches remote JavaScript, hash-compares it, and on mismatch dynamic-`import()`s the new module, rebinding the default export via a Proxy so consumers transparently run the newly fetched code. The fetch destination, pinning, and any integrity checks are hidden inside the JSFuck blob and are not visible to static review. The obfuscation scale (6 MB of JSFuck for a message-builder library) has no legitimate purpose and defeats scanner and reviewer inspection of what actually executes on installer machines.
## Source: ghsa-malware (396af19b57be005328e2697ade736320c214b8f997f5deca03911df68b4c7e63) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
Source & flagged code
0 flagged · loading sourceNo flagged code excerpts are attached to this scan.
Findings
1 High
HighOsv Malicious Advisory
Affected versions and remediation
This report applies to baileys-mbuilder@4.5.0-custom.
The same advisory and Firewall decision cover 10 recorded versions
4.7.0-lts, 4.5.0, 4.5.0-beta, 4.5.0-cjs, 4.5.0-custom, 4.5.0-lts, 4.5.1-cjs, 4.5.2-cjs, 4.5.3-cjs, 4.6.0-lts
See all versions of baileys-mbuilder for other recorded verdicts.
- Avoid installing baileys-mbuilder@4.5.0-custom. 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.
Evidence last updated: .
Source advisory published: .
This report uses published external intelligence. The advisory does not provide a separate source-code analysis for each listed version.
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced.