# MAL-2026-6695: Malicious code in ts-bn-proto (npm)


- **Type:** Malicious package
- **Package:** `ts-bn-proto` (npm)
- **Published:** 30 Jun 2026
- **Also known as:** GHSA-wxpc-r4jx-9jrw

## What is MAL-2026-6695?

MAL-2026-6695 is a malicious package in ts-bn-proto, published on 30 Jun 2026. 

### Official description

Malicious npm package published as part of a coordinated DeFi-themed infostealer campaign. `ts-bn-proto` embeds an infostealer payload directly in `index.js` with a base64-encoded C2 address (`data-stream.space`), executed at install time via a `postinstall` hook. The payload harvests cryptocurrency wallet vaults (MetaMask, Phantom, Solflare, OKX, Coinbase, TrustWallet, Backpack, TronLink), browser cookies and credentials, SSH keys, AWS credentials, developer secrets, and password manager databases, then exfiltrates all data to the attacker-controlled C2.

The package's index.js requires Node's child_process module and contains execSync calls that spawn bash and zsh (around lines 301 and 317). Without further trace evidence, the intent and reachability of these shell invocations cannot be confirmed — they may be benign tooling or a path to executing arbitrary commands on the installer's machine. Given the presence of shell execution primitives in the main module, manual review of index.js around the cited lines is warranted before allowing this package into a build environment.

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

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-6695 is a malicious package: ts-bn-proto (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-6695/ (Markdown: https://insights.sbomify.com/MAL-2026-6695/index.md)
```

## Sources

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

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