2025 Nx "s1ngularity" — malicious npm releases used Claude, Gemini and Q CLIs to hunt developer secrets (Aug 26)
Data compromised
2,349 distinct secrets harvested from 1,079 developer machines — GitHub, npm, AWS and OpenAI keys, SSH keys and cryptocurrency wallets — exfiltrated base64-encoded to roughly 1,400 attacker-created public repositories; a second wave flipped 10,767 private repositories public, exposing 82,901 further secrets (11,168 still valid)
Technical writeup
Verified supply-chain compromise, tracked as CVE-2025-10894 — on August 26, 2025 several malicious versions of the Nx build system (20.9.0 through 21.8.0) were published to npm with a postinstall script that harvested developer credentials. The novel element was AI abuse: rather than only grepping the filesystem, the malware called locally installed AI command-line assistants including Claude, Gemini and Amazon Q, using the developer’s own authenticated agents to enumerate sensitive files and secrets on the host. Stolen data was double and triple base64-encoded and pushed to attacker-created public repositories inside victims’ own GitHub accounts named s1ngularity-repository; GitHub disabled them roughly eight hours later, but the window was long enough for the data to be downloaded. GitGuardian counted 2,349 distinct secrets from 1,079 developer systems, with GitHub, npm, AWS and OpenAI credentials most common and about half still valid at the time of analysis. In a second wave on August 28-29 the attacker reused stolen GitHub tokens to make private repositories public — over 400 users and organisations and more than 5,500 repositories by Wiz’s count, 10,767 repositories and 82,901 additional secrets by GitGuardian’s — turning one npm compromise into a mass credential exposure. Nx maintainers rotated tokens, removed the malicious versions and hardened the vulnerable workflow. recordsAffected is set to the 1,079 attested compromised developer systems; the true blast radius runs through the downstream organisations those credentials unlocked.
Root cause
Injectable GitHub Actions workflow (pull_request_target with an unsanitised pull-request title) leaked an npm publish token; the attacker shipped malicious Nx versions whose postinstall script invoked locally installed AI command-line assistants to enumerate credentials before exfiltrating them
References
- https://www.wiz.io/blog/s1ngularity-supply-chain-attack
- https://blog.gitguardian.com/the-nx-s1ngularity-attack-inside-the-credential-leak/
- https://github.com/advisories/GHSA-cxm3-wv7p-598c
- https://www.stepsecurity.io/blog/supply-chain-security-alert-popular-nx-build-system-package-compromised-with-data-stealing-malware
- https://www.ox.security/blog/nx-supply-chain-breach-how-s1ngularity-weaponized-ai/