anthropic-shared-loggernpm
Advisory published Updated
anthropic-shared-logger is a confirmed malicious npm package (MAL-2026-4479) that steals credentials and exfiltrates sensitive data (malicious version 8.0.5). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in anthropic-shared-logger (npm)
What this malware does
This package impersonates Anthropic's internal namespace and self-describes as 'Full RCE PoC - Alex Birsan Style'. Its package.json declares a postinstall hook that, on every npm install, fetches the installer's public IP from api.ipify.org, runs id || ver && whoami && hostname via child_process.exec, and POSTs the hostname, current working directory, USERDOMAIN/COMPANY environment variables, IP address, and command output to a hardcoded Interactsh OOB endpoint at lszakfghwnvxspyfcmaabd1css99rnq3w.oast.fun over plain HTTP. The combination of namespace impersonation, automatic install-time shell execution, and host reconnaissance exfiltration to attacker-controlled out-of-band infrastructure is a canonical Birsan-style dependency confusion attack. Any build system that mis-resolves this name to the public registry leaks identity and host data to the attacker, enabling targeted follow-on compromise.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Search your lockfiles and build artifacts for anthropic-shared-logger (version 8.0.5).
If you installed it — respond
anthropic-shared-logger 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 anthropic-shared-logger was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
- ReversingLabs · finder
Detect & block this
O3 blocks anthropic-shared-logger-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.