Malicious code in anthropic-setup (npm)
The npm package 'anthropic-setup' version 1.0.1 contains malicious code that hijacks the Anthropic API key and user prompt/response data. It writes a configuration file redirecting API requests to a third-party server controlled by the attacker, exfiltrating sensitive information. The package uses obfuscated code to conceal this behavior from casual inspection.
AI Analysis
Technical Summary
The 'anthropic-setup' npm package (version 1.0.1) masquerades as an Anthropic API setup helper but contains malicious code that writes a settings file (~/.claude/settings.json) with the ANTHROPIC_BASE_URL set to a third-party URL (https://sugarball.vercel.app). It stores the user-supplied Anthropic API key alongside an apiKeyHelper that echoes the key. Because the base URL is not the legitimate api.anthropic.com, all subsequent CLI invocations send the API key and full prompt/response content to the attacker-controlled server. The entrypoint bin.js uses an eval of a base64-decoded string to hide this hijacking logic, making detection difficult through casual registry inspection.
Potential Impact
This malicious package leads to the exfiltration of sensitive user data, including the Anthropic API key and all prompt/response content sent via the Claude CLI. This compromises user confidentiality and potentially allows unauthorized use of the API key by the attacker.
Mitigation Recommendations
No official patch or remediation is currently available. Users should avoid installing or using version 1.0.1 of the 'anthropic-setup' package. Verify package authenticity before installation and monitor for updates or advisories from the package maintainers or npm registry. Consider removing the package and rotating any exposed API keys.
Malicious code in anthropic-setup (npm)
Description
The npm package 'anthropic-setup' version 1.0.1 contains malicious code that hijacks the Anthropic API key and user prompt/response data. It writes a configuration file redirecting API requests to a third-party server controlled by the attacker, exfiltrating sensitive information. The package uses obfuscated code to conceal this behavior from casual inspection.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The 'anthropic-setup' npm package (version 1.0.1) masquerades as an Anthropic API setup helper but contains malicious code that writes a settings file (~/.claude/settings.json) with the ANTHROPIC_BASE_URL set to a third-party URL (https://sugarball.vercel.app). It stores the user-supplied Anthropic API key alongside an apiKeyHelper that echoes the key. Because the base URL is not the legitimate api.anthropic.com, all subsequent CLI invocations send the API key and full prompt/response content to the attacker-controlled server. The entrypoint bin.js uses an eval of a base64-decoded string to hide this hijacking logic, making detection difficult through casual registry inspection.
Potential Impact
This malicious package leads to the exfiltration of sensitive user data, including the Anthropic API key and all prompt/response content sent via the Claude CLI. This compromises user confidentiality and potentially allows unauthorized use of the API key by the attacker.
Mitigation Recommendations
No official patch or remediation is currently available. Users should avoid installing or using version 1.0.1 of the 'anthropic-setup' package. Verify package authenticity before installation and monitor for updates or advisories from the package maintainers or npm registry. Consider removing the package and rotating any exposed API keys.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-12510
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a735740bf8831d539153764
Added to database: 08/05/2026, 15:31:12 UTC
Last enriched: 08/05/2026, 16:56:44 UTC
Last updated: 09/07/2026, 22:20:27 UTC
Views: 20
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.