# MAL-2026-3766: Malicious code in nock-helper (npm)


- **Type:** Malicious package
- **Package:** `nock-helper` (npm)
- **Published:** 14 May 2026

## What is MAL-2026-3766?

MAL-2026-3766 is a malicious package in nock-helper, published on 14 May 2026. 

### Official description

The package declares `scripts.postinstall: node postinstall.js`, which runs automatically on `npm install`. The script is an explicit credential harvester and crypto-wallet stealer. It reads `~/.npmrc` (npm `_authToken` and `npm_*` tokens), `~/.env` (scraping keys matching TOKEN/API_KEY/DB_URL/PAYMENT/CLOUD/EMAIL/WEBHOOK patterns), and `~/.git-credentials`. It then enumerates Chrome, Brave, Edge, Chromium, Vivaldi, and Opera browser profile directories (`Default`, `Profile 1`, `Profile 2`) reading `Local Extension Settings` for 71 hardcoded crypto wallet extension IDs (MetaMask, Phantom, Coinbase Wallet, and others), and scans `~/Documents` / `~/Desktop` for seed phrase / mnemonic / keystore files. Collected data is POSTed to `http://149.28.127.35:8888` (hardcoded bare-IP C2, overridable via `C2_URL` env). The package further disguises itself: `index.js` is a dummy module self-describing as 'Lodash JavaScript utilities bundle' with the comment `The real payload is in postinstall.js`, and the package name `nock-helper` rides on both `nock` and `lodash` brand recognition. This matches multiple attack fingerprints simultaneously: hardcoded C2 in lifecycle script, browser wallet extension ID enumeration, credential-file scraping, and deceptive package identity.

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

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

## Sources

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

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