Nx Build System Hit by 's1ngularity' Attack, Leaking Thousands of Developer Credentials
- John Jordan
- Aug 28
- 2 min read
A sophisticated supply chain attack, dubbed "s1ngularity," has compromised the popular Nx build system, leading to the theft of thousands of developer credentials. Malicious versions of Nx packages were injected into the npm registry, containing code designed to exfiltrate sensitive data like GitHub tokens, API keys, and cryptocurrency wallet information. The attack uniquely weaponized AI tools, marking a new frontier in cyber threats.

Key Takeaways
Credential Theft: Attackers stole thousands of GitHub, cloud, and AI credentials.
AI Weaponization: The attack uniquely leveraged AI tools like Claude and Gemini for reconnaissance and data exfiltration.
Supply Chain Compromise: Malicious versions of the Nx build system packages were published to the npm registry.
Destructive Payloads: Some payloads modified shell startup files, causing system crashes.
Rapid Exfiltration: Stolen data was quickly uploaded to public GitHub repositories before being deleted.
The s1ngularity Attack Unveiled
The "s1ngularity" attack exploited a vulnerability in the Nx build system's workflow, allowing attackers to publish malicious versions of its packages to the npm registry. With over 4 million weekly downloads, Nx is a widely used open-source build platform for managing large codebases. The compromised versions, including Nx 21.5.0 and 20.9.0 among others, contained a post-install script that systematically scanned systems for sensitive files and environment variables.
Data Exfiltration and AI Weaponization
The malicious script was designed to harvest credentials such as SSH keys, NPM tokens, GitHub tokens, API keys, and cryptocurrency wallet data. This harvested information was then encoded and uploaded to public GitHub repositories, often named "s1ngularity-repository." Notably, the attack demonstrated a novel approach by weaponizing AI tools like Claude, Gemini, and Q. Attackers targeted configuration files and authentication tokens associated with these AI CLI tools, recognizing their elevated permissions and access to sensitive development environments.
Impact and Remediation
Security firms like Wiz and GitGuardian observed thousands of leaked secrets, with a significant portion remaining valid even after the repositories were deleted by GitHub. The attack impacted developers using the Nx VSCode extension and potentially build pipelines like GitHub Actions. The Nx maintainers have since revoked compromised tokens, enforced two-factor authentication for publishing, and updated their security mechanisms. Users who installed the affected versions are strongly advised to rotate all credentials, tokens, and API keys immediately and to check their shell startup files for malicious modifications.
As cyber threats become increasingly sophisticated, your security strategy must evolve to keep pace. BetterWorld Technology offers adaptive cybersecurity solutions that grow with the threat landscape, helping your business stay secure while continuing to innovate. Reach out today to schedule your personalized consultation.
Sources
Hackers Target Popular Nx Build System in First AI-Weaponized Supply Chain Attack, SecurityWeek.
The Nx "s1ngularity" Attack: Inside the Credential Leak, Security Boulevard.
Malicious Nx Packages in 's1ngularity' Attack Leaked 2,349 GitHub, Cloud, and AI Credentials, The Hacker News.