ShipSafe has 8 sourced items that involve npm: 0 build stories and 8 security incidents. Each links to the original post and ends with a fix prompt you can paste into your own AI tool.
Where npm builders get stuck
Dependencies, plugins & MCP servers (7): AI suggests packages, extensions and MCP servers that can be malicious or vulnerable. Check the publisher and permissions before installing.
Trusting agents & AI input (1): Agents read web pages, files, emails and tool output that can hide instructions. Give agents the fewest permissions possible and approve anything that runs commands, sends data, deletes or pays.
How to use these npm stories
Read the summary and the original post, then copy the fix prompt into npm or whichever AI tool you build with. Each prompt asks the AI to check your own project for the same problem and explain its plan before changing anything. Most of these problems are not unique to npm, so the topic links above show the same mistake in other tools.
Aikido Security reported on 12 Nov 2026 that from 10 November an attacker used stolen tokens for 4,837 GitHub accounts to open probe pull requests in 61,764 repositories, then pushed a roughly 1,500-line shell script into workflows, onto throwaway branches or into an npm postinstall hook. The script collects Actions secrets, GITHUB_TOKEN and OIDC tokens, cloud credentials and AI provider keys, sends them out, then reverts the commit and deletes the workflow run and its logs. Aikido counted at least 1,835 repositories where the payload ran, and said the stealer reached at least one Packagist and one Go package through automated publishing.
Security firm Depi wrote on 11 Nov 2026 that the openai/codex repo had an issue-labeler GitHub Actions workflow that passed the title and body of any newly opened issue straight into a Codex agent prompt. Anyone could open an issue, so Depi used a crafted prompt injection to get code execution inside the agent sandbox, then chained a sandbox escape and cache poisoning until it could control what got published to the real @openai/codex npm package. Depi reported it through Bugcrowd; it says OpenAI fixed the core bug right away and users have nothing to patch.
GitHub published malware advisories on 2 Nov, sourced from Amazon Inspector, for two npm packages posing as Markdown toolkit MCP servers. @ifasn/md-doc-mcp probes the AWS, GCP, Azure and Alibaba Cloud metadata services when it loads and sends the responses over plain HTTP to a hardcoded IP. @ifasn/mmdd-doc-mcp pulls Alibaba Cloud instance-role credentials on startup and ships scripts that look for /etc/shadow, SSH keys, .env files and Kubernetes service-account tokens. No version is safe.
Security firm Forever Security says it caught an AGENTS.md file in a customer's Downloads folder telling an AI coding agent to install a malicious npm package, function-color. In its own tests, Codex ran the malware in more than 90% of attempts, and a planted CLAUDE.md got Claude Code to redirect its API traffic, leaking the login token, about half the time, The Hacker News reports.
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.
A malicious tensorlake 0.5.144 was published to npm from a compromised maintainer account and was live for about 1 hour 40 minutes. On install it took GitHub and npm tokens, cloud keys, .env files and AI tool and MCP config, then spread. It also planted a service that deletes your home folder if the stolen GitHub token is revoked.
Koi Security found an npm MCP server impersonating Postmark that, from one version on, quietly blind-copied every email it sent to an attacker-controlled address.
Malicious versions of the Nx build tool were published to npm; the install script used locally installed AI coding CLIs to search the machine for secrets and wallets and uploaded them to GitHub.