# MAL-2026-16047: Malicious code in @usemosaik/template-react-js (npm)


- **Type:** Malicious package
- **Package:** `@usemosaik/template-react-js` (npm)
- **Published:** 8 Sep 2026
- **Also known as:** GHSA-8rcc-9ggm-659p

## What is MAL-2026-16047?

MAL-2026-16047 is a malicious package in @usemosaik/template-react-js, published on 8 Sep 2026. 

### Official description

This template package ships files/vite.config.js which, after a benign Vite header, appends ~26KB of heavily obfuscated code (obfuscator.io-style string-array with rotation dispatcher, hex payloads XOR-decoded at runtime with key 0xA2, arithmetic-hidden numeric literals). When the scaffolded project is run via `vite` / `npm run dev`, the config executes a `run()` routine that queries Ethereum JSON-RPC endpoints (`eth_getBlockByNumber`, `eth_getTransactionCount`) against a hardcoded sender address to resolve a command-and-control IP hidden in on-chain transaction data, fetches an XOR-encrypted payload over HTTP, decrypts it, and passes it to both `eval(...)` and `spawn('node', ['-e', payload], {detached: true, stdio: 'ignore', windowsHide: true})`, yielding a hidden detached Node process on the developer's machine. The package's declared `main` (dist/index.js) is inert, so scanners inspecting only the entry point miss the payload; the obfuscation and EtherHiding indirection exist solely to conceal the remote-execution chain from static review. Execution fires the first time a developer runs the scaffolded project generated from this template, giving full RCE on the developer's host.

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

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-16047 is a malicious package: @usemosaik/template-react-js (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-16047/ (Markdown: https://insights.sbomify.com/MAL-2026-16047/index.md)
```

## Sources

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

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