Incident report
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 record
- Reported
- Severity
- Critical
- Vector
- Supply Chain
- Affected 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 lesson
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.
Research citation
Referenced 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