identity-poc npm package: malicious load-time recon and host-data exfiltration via dependency confusion
Severity: critical · Patch status: no-fix-needed · Since 2026-11-20
The npm package identity-poc version 1.0.3 contains malicious code that executes a top-level IIFE on require() or CLI invocation. It runs id, whoami, and ls -la, reads /etc/passwd, and POSTs the collected report to an attacker-supplied URL from process.argv[2]. The payload emits an IDENTITYPOCEXECUTED marker and is described as a controlled execution verification, consistent with a dependency-confusion or bug-bounty proof-of-concept. Any environment that installs and loads this package name, including through dependency-confusion resolution against an internal package of the same name, executes shell reconnaissance and leaks host data off-box. No patched versions are listed; the package should be removed or blocked.
What to do
- Immediately remove identity-poc 1.0.3 from lockfiles, node_modules, package caches, build artifacts, and container images.
- Block the identity-poc package name and version in npm proxies, registries, and dependency-confusion controls.
- Investigate any host that installed or loaded the package for credential exposure and outbound POSTs to unknown URLs; rotate secrets if exposure is suspected.
- Audit internal package names and scopes for dependency-confusion exposure, and enforce scoped registry configuration and lockfile review.
- Monitor egress logs and process telemetry for id, whoami, ls -la, /etc/passwd access, and the IDENTITY_POC_EXECUTED marker.
Sources
All live incidents on Threat Watch