Check your projects for the api-anthropic npm package
Fake 'api-anthropic' npm package flagged as malware · Security incident · GitHub Advisory · GitHub · Oct 19, 2026
What happened
On 19 Oct GitHub's Advisory Database published GHSA-cj9w-7h22-q93g, flagging the npm package api-anthropic as malware for all versions. GitHub says any computer that installed or ran it should be considered fully compromised and every secret on it rotated from a different computer. The name looks like an Anthropic SDK, but the official package is @anthropic-ai/sdk; npm has since replaced api-anthropic with a security placeholder.
How to prevent it
Install AI SDKs only under their official names (Anthropic's is @anthropic-ai/sdk) and check any package your AI tool adds before installing it. If api-anthropic was ever installed, rotate every key on that machine from another computer. See API key protection.
Fix prompt for your own AI tool
Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.
I build apps with an AI coding tool and want to check I never installed the malicious npm package api-anthropic (GitHub advisory GHSA-cj9w-7h22-q93g, 19 Oct 2026). 1) Show me how to search all my projects' package.json and lock files, and my global npm installs, for api-anthropic. 2) Check that any Anthropic SDK I use is the official @anthropic-ai/sdk and list any other packages with look-alike names. 3) If api-anthropic shows up anywhere, explain why I should treat that computer as compromised, list the kinds of secrets it could reach, and give me the order to rotate them at each provider from a different, clean computer. 4) Suggest a simple habit so my AI tool can't add unknown packages without me checking the name first. Explain your plan before changing anything. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.
Why this keeps happening: dependencies, plugins & mcp servers
AI tools suggest packages, editor extensions and MCP servers by name, and attackers publish look-alike or hijacked versions that steal keys or run code on install.
A quick checklist before you ship
- Check the publisher, download history and repository before installing anything an AI suggests.
- Pin versions and use a lockfile; review changes when updating.
- Give MCP servers and extensions the fewest permissions possible.
- Rotate keys if a package you use is reported as compromised.
More on this: every dependencies, plugins & mcp servers story and our related guide.
Tools involved
Anthropic API stories, npm stories, Claude Code stories, Cursor stories
Related stories
- Check for LiteLLM 1.107.0 and rotate every key it could reach
Poisoned LiteLLM 1.107.0 stole provider keys on every Python start - If your company inspects HTTPS traffic, ask IT to lock down who can change inspection rules and issue server certificates, and keep AI coding tools updated from trusted networks
UpdateMITM: Cursor, Claude Code and VS Code updates could be swapped for malware on intercepted networks - Before you open a repo you didn't write in an AI coding tool, read its AGENTS.md, CLAUDE.md, .claude/, .cursor/, .mcp.json and .vscode/tasks.json, and never let the agent run a script it is told not to inspect
Bitdefender: poisoned GitHub repos tell Claude Code, Cursor and Copilot to run a hidden credential stealer
Source: original post on GitHub Advisory ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.