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

Inspect in Interactive Incidents Hub

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