# MAL-2026-10012: Malicious code in mchain-sdk (npm)


- **Type:** Malicious package
- **Package:** `mchain-sdk` (npm)
- **Published:** 9 Jul 2026
- **Also known as:** GHSA-frcx-7v83-jfwx

## What is MAL-2026-10012?

MAL-2026-10012 is a malicious package in mchain-sdk, published on 9 Jul 2026. 

### Official description

package.json declares a postinstall hook `node./src/core/index.js`. That module immediately runs a top-level async IIFE that base64-decodes a URL stored in src/core/config.js under `MULTI_CHAIN_CONFIG.dev.apiKey` (decoding to https://jsonkeeper.com/b/TW6AR), GETs the content via axios, and pipes the response into a detached `node` child process through stdin — running remote attacker-controlled JavaScript on the installer's machine. The same payload also fires at library load time: src/index.js (the package main) imports `multiChainInterface` from./core/index.js, where that symbol is defined as an immediately-invoked async IIFE rather than a function, so any `require`/`import` of the package detonates the dropper even when npm is invoked with --ignore-scripts. The remote endpoint is an anonymous paste on jsonkeeper.com whose content is mutable and unverified. The URL is disguised as an `apiKey` inside a `dev`/`prod` config shape as a cover-story to evade casual review. The package clones the API surface, README, and wiki links of the legitimate uhop/stream-chain library and republishes it under the name mchain-sdk with the hostile payload appended — a typosquat/brand-clone repackage with an install- and import-time dropper.

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-10012?

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-10012 is a malicious package: mchain-sdk (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-10012/ (Markdown: https://insights.sbomify.com/MAL-2026-10012/index.md)
```

## Sources

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

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