anthropic-shared-logger (npm) · Malicious Code
Affects anthropic-shared-loggerSource GCVE Database
Rated by Threat Radar
Data as of 8 Sep 2026, 08:23 UTC
What to do
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.
AI-suggested
Users and organizations should verify the source of the 'anthropic-shared-logger' package before installation to ensure it is not resolved from the public npm registry. Implement strict package resolution policies to prevent dependency confusion attacks, such as using scoped packages, private registries, or package allowlists. Monitor build configurations to avoid unintentional public package resolution.
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.