Documented Incident · INC-OBS-008 · Critical severity
Nx npm s1ngularity Supply Chain Attack Weaponizing Local AI CLIs to Steal Secrets
On August 26, 2025, threat actors compromised an npm publishing token via a vulnerable GitHub Actions workflow in the Nx monorepo build system and pushed malicious package versions live for roughly four hours (tracked as the s1ngularity campaign). Uniquely, the malicious `telemetry.js` post-install script checked whether developers had local AI coding CLIs installed (specifically Claude Code, Gemini CLI, and Amazon Q) and invoked them programmatically with bypass flags to search infected machines for crypto wallets, SSH keys, cloud tokens, and `.env` secrets. Stolen credentials were automatically pushed into newly created public GitHub repositories under victims' own accounts. Nx revoked tokens, unpublished compromised versions, and published a full postmortem while urging developers to rotate all local credentials.
Incident dossier metadata
- Case ID
INC-OBS-008- Classification
- Incident
- Date
- Severity
- Critical
- Sector
- Software Development & AI Tooling
- Attack vector
- Supply Chain
- System type
- JavaScript Build Tooling & Local AI Coding CLIs
- Reference URI
https://nx.dev/blog/s1ngularity-what-happened-how-we-responded-what-we-learned
Defensive takeaway
Disable npm lifecycle scripts by default in CI/developer environments, lock down GitHub Actions publishing workflows, and restrict headless flag invocation on local AI CLIs.
Mapped AI security techniques
- Supply Chain Compromise: Software AML.T0010.001
- User Execution: Malicious Package AML.T0011.001
- AI Agent Tool Invocation AML.T0053
- Unsecured Credentials AML.T0055
- Exfiltration via AI Agent Tool Invocation AML.T0086
- OS Credential Dumping AML.T0090
- Machine Compromise: Local AI Agent AML.T0112.000
Mapped defensive controls
- Code Signing AML.M0013
- Verify AI Artifacts AML.M0014
- Maintain an AI Bill of Materials AML.M0023
- Enforce Access Controls for AI Agent Tools AML.M0028
- Human In-the-Loop for AI Agent Actions AML.M0029