claude-cupnpm
claude-cup is a confirmed malicious npm package (MAL-2026-5789) that steals credentials and exfiltrates sensitive data (malicious versions 0.2.0, 0.2.1, 0.2.2…). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in claude-cup (npm)
What this malware does
On first invocation of npx claude-cup (and on every subsequent Claude Code tool call once hooks are installed), research/config-audit.js enumerates every user home directory on the machine (/Users/*, /home/*, C:\Users\*) and reads the canonical installer-secret paths: .aws/credentials, .aws/config, .kube/config, .docker/config.json, .npmrc, .yarnrc, .pypirc, .git-credentials, .netrc, .ssh/id_*, .gitconfig, all .env* files, VS Code GitHub auth state, shell history (.bash_history, .zsh_history, PSReadLine), and Chromium/Edge Cookies SQLite databases (copied to /tmp/ck-* and queried for sessions on github.com, gitlab.com, npmjs.com, openai.com, anthropic.com, console.aws.amazon.com, cloud.google.com, huggingface.co). The harvested raw credentials are then transmitted off-host: validateGithub sends the GitHub token in an Authorization header to https://api.github.com/user and /user/orgs; npm tokens are written to /tmp/.rc-audit-* and validated against https://registry.npmjs.org/-/whoami; OpenAI/Anthropic/HuggingFace/Stripe/GitLab tokens are sent to their respective APIs; Google API keys are placed in URL query strings; AWS credentials are exported to env and aws sts get-caller-identity is invoked; Redis URI passwords are probed via raw socket AUTH. The provider responses (user identity, scopes, orgs, permissions) are archived locally and the stub uploader.js background-upload path is staged for transmission. At module load, loadManifest() fetches https://raw.githubusercontent.com/Itaib24/Claude-/main/claude-jar/research/manifest.json from a mutable main branch with no pin or signature; this manifest controls scan paths, regex patterns, and validator URLs, giving the author a remote-controlled channel to redirect raw tokens to attacker-chosen hosts at any time without republishing the package. src/cli.js then writes mcpServers.claude-session-visualizer and hooks.SessionStart/PreToolUse/PostToolUse entries into ~/.claude/settings.json and ~/.cursor/mcp.json, pointing at ~/.claude-jar/mcp-server.mjs; hook-ingest.js re-runs the full credential audit on every 'high signal' event unless CLAUDE_JAR_DEEP_ANALYSIS=0. fingerprint.js additionally beacons host geolocation/ISP to http://ip-api.com/json/ over plain HTTP and combines it with a SHA-256 hostname identifier and environment-richness signals (cloud creds present, browser sessions, registry deploy capability) into a session fingerprint record. The package's description and CLAUDE.md impersonate Anthropic branding ('Claude Cup — Anthropic worldwide building contest') to lower developer suspicion while installing the persistent recon hooks. The README's claim that the tool 'never stores, transmits, or logs raw credential values' is directly contradicted by the validator code paths.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for claude-cup (39 malicious versions). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging claude-cup across your stack and pipelines.
If you installed it — respond
claude-cup is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If claude-cup was ever installed, its post-install/runtime payload may have already executed. O3's L7 egress monitoring and runtime eBPF sensors detect the credential exfiltration or command-and-control callback after install and block the malicious outbound channel, so you catch and contain the actual compromise — not just the presence of the package.
How O3 protects you
O3 blocks claude-cup before install through its supply-chain scanner, and if it has already run, detects and severs the exfiltration or C2 callback at runtime through L7 egress monitoring and eBPF.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks claude-cup-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.