TL;DR: Attackers used a fake npm support domain and trojanized more than 40 packages, including widely used dependencies, to steal credentials, plant workflows, and exfiltrate data, while AI coding agents automatically installed poisoned releases as soon as they appeared, according to Oligo Security. The real control gap is runtime trust: static dependency review cannot protect programmes when agents resolve and execute code without human review.
NHIMG editorial — based on content published by Oligo Security: The Hidden Risks of the NPM Supply Chain Attacks: AI Agents
Questions worth separating out
Q: What breaks when AI coding agents automatically install poisoned npm packages?
A: The break point is the human review window.
Q: Why do automated build identities increase supply chain compromise risk?
A: Automated build identities often have access to package registries, repositories, and secrets that were granted for delivery efficiency, not for adversarial resilience.
Q: How do security teams know whether a dependency risk is real or only declared?
A: They need runtime evidence.
Practitioner guidance
- Inventory every identity that can install or republish dependencies Map developer accounts, CI/CD service accounts, bots, and AI coding agents that can resolve packages, write workflows, or publish artifacts.
- Require runtime verification for executed dependencies Use runtime controls to observe what is actually installed, loaded, and executed in build and production environments.
- Restrict secrets available to build and agent identities Remove long-lived tokens, broad cloud credentials, and repository write permissions from identities that only need task-scoped access.
What's in the full article
Oligo Security's full blog post covers the operational detail this post intentionally leaves for the source:
- The step-by-step dependency chain that led Codex to install the backdoored [email protected] release.
- Runtime screenshots and detection details showing how compromised packages were identified in live environments.
- The exact npm package relationships that let the malicious version propagate through the build path.
- Examples of how the vendor's runtime detection surfaced installation, loading, and execution events.
👉 Read Oligo Security's analysis of npm supply chain attacks and AI agent exposure →
AI agents and npm supply chain compromise: are your controls keeping up?
Explore further
Runtime dependency trust is a governance assumption, not a technical guarantee: Declared package ranges were designed for human-reviewed release cycles and stable publishing pipelines. That assumption fails when an AI agent or automated build system resolves and installs new code immediately after publication. The implication is that dependency trust has become an execution-time governance problem, not a manifest-review problem.
A few things that frame the scale:
- The average estimated time to remediate a leaked secret is 27 days, despite 75% of organisations expressing strong confidence in their secrets management capabilities, according to The State of Secrets in AppSec.
- Only 44% of developers are reported to follow security best practices for secrets management, exposing a significant developer behaviour gap.
A question worth separating out:
Q: Should organisations treat AI coding agents like privileged software identities?
A: Yes. If an AI agent can install code, access secrets, or modify repositories, it is functionally acting as a privileged non-human identity and should be governed that way. That means task-scoped access, explicit boundaries, and monitoring of its downstream actions, especially when it can touch build and release systems.
👉 Read our full editorial: AI agents amplify npm supply chain risk through runtime dependency use