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

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

Source: original post on GitHub Advisory ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.

The Honest Build. Real stories, not hype.

Every week: real stories of what building with AI actually took, the one lesson worth keeping, and the security slip-ups to avoid. Free, unsubscribe anytime. Weekly, every Friday.