GHSA-hf34-hjvf-99ph
Malicious code in anthropic-internal-tools (npm)
Auswirkung
## Source: amazon-inspector (ab3bb04aee6f5f1d8768b7fd2173cd7c0cac18b5d83d6a83cf2be96a7512d8f7) Package name impersonates the Anthropic namespace and ships a preinstall hook (scripts.preinstall = 'node index.js') that executes on every `npm install`. index.js performs bulk reads of installer-side credential files from the home directory — ~/.aws/credentials, ~/.aws/config, ~/.config/gcloud/application_default_credentials.json, ~/.azure/accessTokens.json, ~/.ssh/id_rsa.pub (and probes id_rsa), ~/.npmrc, ~/.gitconfig — and uses execSync to curl AWS IMDS (http://169.254.169.254/latest/meta-data/iam/security-credentials/) and GCP metadata (http://metadata.google.internal, Metadata-Flavor: Google) to capture IAM/service-account tokens. It also collects os.hostname(), os.userInfo(), cwd, and environment variables matching KEY|TOKEN|SECRET|PASS|AUTH|CRED|AWS|GCP|AZURE|NPM|REGISTRY. The beacon is POSTed via https.request to a hardcoded collector at https://webhook.site/2d1764b2-1249-4793-840f-7846d7d820cd. Installing this package on a developer workstation or CI runner discloses long-lived cloud credentials, SSH keys, and registry tokens to a third-party endpoint, and on cloud-hosted CI additionally yields short-lived IAM/service-account tokens usable to pivot into the installer's cloud account. The package self-describes as a 'dependency confusion PoC', confirming the namespace-impersonation intent against an internal Anthropic-named package. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/0c188bba4712ada22bb0325b38a60ca0e71fe067/osv/malicious/npm/anthropic-internal-tools/MAL-2026-6551.json))
Betroffene Pakete
| Ökosystem | Paket | Betroffen | Behoben in |
|---|---|---|---|
| npm | anthropic-internal-tools | > 0 | nicht erfasst |
| npm | anthropic-internal-tools | = 1.0.0 | nicht erfasst |
| npm | anthropic-internal-tools | = 1.0.2 | nicht erfasst |
| npm | anthropic-internal-tools | = 1.0.1 | nicht erfasst |
Schwachstellenklasse
Referenzen
- GitHub-Advisory
- https://github.com/advisories/GHSA-hf34-hjvf-99ph
- https://github.com/ossf/malicious-packages/blob/0c188bba4712ada22bb0325b38a60ca0e71fe067/osv/malicious/npm/anthropic-internal-tools/MAL-2026-6551.json
- https://www.npmjs.com/package/anthropic-internal-tools/v/1.0.0
- https://www.npmjs.com/package/anthropic-internal-tools/v/1.0.1
- https://www.npmjs.com/package/anthropic-internal-tools/v/1.0.2
- https://github.com/ossf/malicious-packages/blob/ca35a319f3c5255ac2d7f28cf58023d75de17a35/osv/malicious/npm/anthropic-internal-tools/MAL-2026-6551.json