TL;DR: A malware campaign targeting more than 50 npm packages used injected scripts to republish packages, steal developer secrets such as GitHub, npm, and cloud credentials, and exfiltrate data to a public repository, according to Orca Security. Package compromise now turns routine dependency installs into secret-harvesting events that identity and security teams must treat as credential exposure, not just code tampering.
Editorial analysis by NHI Mgmt Group, based on content published by Orca Security: “Massive npm Malware Campaign Infects Popular Packages, @ctrl/tinycolor Affected”.
By the numbers:
- The campaign targeted more than 50 npm packages at the time of writing.
Key questions
Q: What should teams do after a malicious npm package has run in CI/CD?
A: Contain the build environment, assume secrets on that system are exposed, and rebuild from a known-good baseline before restoring access.
Q: Why do NPM supply chain attacks create an identity risk as well as a code risk?
A: They become an identity risk because malicious packages often target the secrets and credentials available to build jobs, developer machines, and CI/CD pipelines.
Q: What are the signs that a supply chain compromise has moved from package tampering to secret theft?
A: Look for unusual package republishing, unexpected install scripts, new workflow files, outbound connections from build hosts, and unexplained secret rotation alerts.
Practitioner guidance
- Audit package-install execution paths Block or tightly control postinstall and republish behaviour in build and developer environments so package installation cannot execute arbitrary scripts without review.
- Reduce reachable secrets in dev and CI Remove long-lived GitHub, npm, and cloud credentials from local environments and pipelines where package code can enumerate them during install.
- Inventory affected dependencies immediately Identify every direct and transitive use of the compromised npm versions and isolate systems that may have installed them during the attack window.
Bottom line: The campaign shows how npm compromise can become credential compromise when install-time code reaches developer and cloud secrets.
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
Package integrity is now an identity control problem, not just a software supply chain problem. The attack succeeded because trusted package installation provided code execution inside environments that already held reusable secrets. That shifts the control discussion from artifact validation alone to the identities and credentials reachable at install time. Practitioners should treat maintainer access, CI tokens, and developer secrets as a single exposure surface.
A few things that frame the scale:
- 59% of compromised machines in a major 2025 supply chain attack were CI/CD runners rather than personal workstations, according to the State of Secrets Sprawl 2026.
- 92% of organisations expose NHIs to third parties, raising concerns about supply chain security, according to the Ultimate Guide to NHIs.
A question worth separating out:
Q: How should organisations compare package signing and secret management in npm risk reduction?
A: Package signing helps verify artifact integrity, but it does not protect secrets that are already present when a malicious install runs. Secret management reduces what the attacker can collect if execution occurs. Teams need both controls because provenance and credential exposure are separate failure points.
👉 Read our full editorial: Shai-Hulud shows how npm supply chain attacks harvest secrets