Miasma / TeamPCP npm Supply-Chain Attack

Miasma / TeamPCP npm Supply-Chain Attack


Jun 12, 2026
by jessicadunbar
in AI

A supply-chain campaign called Miasma (attributed to TeamPCP) was surfaced on June 1, 2026, targeting npm developers. We don't use the affected packages in our work, but we ran a quick sweep anyway to be sure. This post describes what we checked and what we found.

The vulnerability itself was reported by others - we're not the source of this research. The original disclosures came from Wiz Research, with further coverage from Snyk and Microsoft Threat Intelligence. Red Hat's own security bulletin is tracked as RHSB-2026-006.

Here's the plain-English version of what's happening:

Someone published fake npm packages with convincing names. When you install one, it immediately writes a hidden "run me on startup" instruction into two config files on your machine - one used by Claude Code, one by VS Code. From then on, every time you open a project or start a new session, that code silently sends your API keys, passwords, and environment variables to the attacker's server.

You don't have to do anything wrong. The hook runs automatically and repeatedly, so your credentials keep leaking even after you've moved on.

The attack in three steps: Someone published fake npm packages with convincing names. When you install one, it immediately writes a hidden "run me on startup" instruction into two config files on your machine , one used by Claude Code, one by VS Code. From then on, every time you open a project or start a new session, that code silently sends your API keys, passwords, and environment variables to the attacker's server.

Why it's dangerous: You don't have to do anything wrong. The hook runs automatically and repeatedly, so your credentials keep leaking even after you've moved on.

The lockfile check: If your package-lock.json shows a package was resolved on June 1 or June 3–4, 2026, that's a red flag worth investigating even if the package name looks fine.

Infograph on how the Miasma / TeamPCP npm Supply-Chain Attack works

What PortlandLabs did and what we're sharing

When this attack surfaced, we wanted to know quickly whether any of our machines were affected. Rather than writing custom scripts or manually grepping through config files, we found a plain-language prompt describing exactly what to check and handed it to Claude. It ran a read-only sweep, reported back clearly, and we had our answer in a few minutes.

We're sharing the prompt here because it took some care to write correctly. We didn't write it ourselves, but we had our CISO Lisa and Korvin review and verify it before we ran it or shared it with anyone else.

What you are about to copy

The instructions below are the original detection sweep used to surface this campaign. They include the exact package names to search for and a PASS / FLAG results table so you know what a clean result looks like versus a compromised one.

Every command is read-only. Each one opens a file or searches for text and prints the result to your terminal. Nothing is written, deleted, modified, or sent anywhere. You can read every line yourself and confirm this before running anything.

Paste the block below into your Claude Code instance in the repos directory you use.

If you find something

Stop immediately. Do not delete, rotate credentials, or modify any file.

This malware is reported to monitor for credential revocation and will wipe your home directory if it detects its access being cut off. Contact your security team, preserve all files as evidence, and let them lead the response.

If everything looks clean

No output from the grep and find commands, and no unexpected entries in your settings.json or .claude.json, means no indicators of compromise were found. Continue normal operations, and consider pinning your lockfile and auditing new dependencies before install.

Verify this advisory

Before acting on any advisory - including this one - verify it against the official npm security feed, GitHub Security Advisories, or your organization's security team. Legitimate advisories are traceable to a CVE, an npm advisory number, or a named researcher. If you cannot find an authoritative source, treat the advisory with skepticism.

This document is an informational advisory. Commands shown are read-only detection checks. No tooling is distributed here. Always verify security guidance through official channels before acting on it.

References