s1ngularity Nx Supply Chain Attack: AI-Driven Credential Theft & Mass Exposure
s1ngularity Attack: AI-Powered Supply Chain Compromise Targets Nx Ecosystem
Summary
On August 26, 2025, a large-scale supply chain attack named the s1ngularity attack targeted the Nx npm ecosystem and GitHub repositories worldwide. Attackers exploited a compromised GitHub Action to steal npm publishing tokens, injecting malware into popular Nx package versions.
The malware harvested environment variables, GitHub and npm tokens, and even weaponized AI command-line tools to automate reconnaissance and data theft. This led to the exposure of over 6,700 private repositories, with sensitive data from 1,700+ users leaked publicly. Many stolen tokens remained valid for days, amplifying the impact. The incident underscores the growing role of AI in supply chain compromises and highlights the urgent need for artifact visibility, stronger monitoring, and AI-aware defense strategies.
Attack Details
Initial Exploitation: Attackers leveraged a vulnerable GitHub Action to capture npm tokens, then injected malicious code into widely used Nx packages.
Malware Behavior: The malicious packages exfiltrated tokens, secrets, and files while invoking AI CLI tools with insecure flags (
--yolo
,--trust-all-tools
) to dynamically decide which files to steal.Repository Exposure: Compromised GitHub accounts were used to flip private repositories to public, renaming them to “s1ngularity-repository” and exposing sensitive assets.
Scope of Impact: Over 20,000 files were stolen, with 1,700+ users affected. At least 6,700 private repos were turned public, some belonging to major organizations.
AI Weaponization: The use of AI-driven reconnaissance set this attack apart, enabling more adaptive and evasive tactics than traditional malware campaigns.
Recommendations
Identify Exposure and Rotate Credentials: If affected Nx versions were installed (e.g., nx 20.9.0–20.12.0, 21.5.0–21.8.0; @nx/enterprise-cloud 3.2.0; @nx/devkit 20.9.0, 21.5.0; @nx/workspace 20.9.0, 21.5.0; @nx/js 21.5.0; @nx/eslint 21.5.0; @nx/key 3.2.0; @nx/node 20.9.0, 21.5.0), treat the environment as compromised. Revoke and rotate all GitHub tokens, npm tokens, API keys, and SSH credentials.
Remediation Steps: Delete
node_modules
, clear npm cache, and reinstall only safe versions. Inspect .bashrc/.zshrc for injected shutdown commands and remove malicious files like/tmp/inventory.txt
. Review any repositories named “s1ngularity-repository.”Audit GitHub Activity: Check logs for s1ngularity-related repo creation, sudden changes in repository visibility, and abnormal GitHub Action behavior. Feed logs into SIEMs for long-term monitoring.
Harden Supply Chain Security: Adopt npm Trusted Publishers to eliminate static publishing tokens, pin dependencies and GitHub Actions to verified commits, and maintain SBOMs to track exposure quickly.
AI-Aware Defense Posture: Update threat models for AI-assisted attacks, restrict unvetted AI CLI tools in developer environments, and train teams to detect AI-driven exfiltration patterns.
Indicators of Compromise (IoCs)
Filenames
/tmp/inventory.txt
/tmp/inventory.txt.bak
Ethereum Address
0xFc4a4858bafef54D1b1d7697bfb5c52F4c166976
MITRE ATT&CK TTPs
Initial Access: T1195 (Supply Chain Compromise), T1195.002 (Compromise Software Supply Chain)
Execution: T1059 (Command & Scripting Interpreter), T1204.002 (User Execution – Malicious File)
Persistence: TA0003 (Persistence)
Defense Evasion: T1036 (Masquerading), T1027 (Obfuscated Files/Information)
Credential Access: T1552.001 (Credentials in Files), T1552.007 (Container API Credentials)
Discovery: T1083 (File and Directory Discovery), T1518 (Software Discovery)
Collection: T1005 (Data from Local System), T1213 (Data from Information Repositories)
Exfiltration: T1567 (Exfiltration Over Web Service), T1567.002 (Exfiltration to Cloud Storage)
Command & Control: T1584 (Compromise Infrastructure), T1586 (Compromise Accounts)
Impact: T1565 (Data Manipulation)
References
What’s new on HivePro
Get through updates and upcoming events, and more directly in your inbox