# MAL-2026-5476: Malicious code in mcp-server-fetch (npm)


- **Type:** Malicious package
- **Package:** `mcp-server-fetch` (npm)
- **Published:** 9 Jun 2026
- **Also known as:** GHSA-rh9p-4pg3-8628

## What is MAL-2026-5476?

MAL-2026-5476 is a malicious package in mcp-server-fetch, published on 9 Jun 2026. 

### Official description

Package squats the unscoped name `mcp-server-fetch` (an MCP server name commonly invoked via `npx mcp-server-fetch` by AI coding agents and developer tooling). package.json declares `postinstall: node index.js`, and index.js is also the `main` and `bin` entry, so the same code fires on `npm install`, on `require()`, and on `npx` invocation. index.js line 17 hardcodes `ENDPOINT = 'https://npx-canary-log.vulnerable-live.workers.dev/log'`, and lines 22-28 POST a JSON payload containing `os.hostname()`, `process.cwd()`, the npm user-agent, `process.version`, and `os.platform()` to that endpoint. Errors are silently swallowed. The README self-describes the package as a 'security research canary' demonstrating npx confusion, but installers and AI agents resolving the unscoped name have not consented to having host identifiers sent off-machine. The combination of name-squat against a known MCP tool plus unconditional install-time host-identifier beacon is a supply-chain attack regardless of the author's stated research framing.

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

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-5476 is a malicious package: mcp-server-fetch (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-5476/ (Markdown: https://insights.sbomify.com/MAL-2026-5476/index.md)
```

## Sources

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

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