# MAL-2026-14529: Malicious code in baileys-mbuilder (npm)


- **Type:** Malicious package
- **Package:** `baileys-mbuilder` (npm)
- **Published:** 26 Aug 2026
- **Also known as:** GHSA-8m87-xx52-4rjw

## What is MAL-2026-14529?

MAL-2026-14529 is a malicious package in baileys-mbuilder, published on 26 Aug 2026. 

### Official description

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.

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.

## What should I do about MAL-2026-14529?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

## Fix prompt for AI coding agents

```text
MAL-2026-14529 is a malicious package: baileys-mbuilder (npm). Every version was published to cause harm.

Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.

Reference: https://insights.sbomify.com/MAL-2026-14529/ (Markdown: https://insights.sbomify.com/MAL-2026-14529/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/MAL-2026-14529

---
From sbomify Insights: https://insights.sbomify.com/MAL-2026-14529/
Summaries are generated and may contain mistakes; the official description above is the record.
