anthropic-shared-logger (npm) · Malicious Code
Affects anthropic-shared-loggerSource GCVE Database
Malicious package : remove anthropic-shared-logger and rotate any secrets on hosts that installed it.
Data as of 8 Sep 2026, 08:23 UTC
Malicious package
Published to npm · OSV MAL-2026-4479
What to do
Remove anthropic-shared-logger from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmanthropic-shared-logger | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The npm package 'anthropic-shared-logger' version 8.0.5 is a malicious package impersonating Anthropic's internal namespace. It contains a postinstall script that executes shell commands on the installer's machine and exfiltrates system information and environment variables to an attacker-controlled server. This behavior is characteristic of a dependency confusion attack, potentially exposing sensitive host data during build processes that mistakenly resolve this package from the public registry.