Introduction
A coordinated supply chain attack through the Nx build system stole thousands of developer credentials and compromised hundreds of npm packages. CVE-2025-10894 shows how a single workflow misconfiguration can spread into widespread compromise across the JavaScript ecosystem.
Nx, developed by Nrwl, is a widely adopted build system for JavaScript monorepos. Major enterprises and open source teams build their projects with it, it has millions of weekly downloads, and it is deeply integrated into CI/CD pipelines. A compromise of Nx therefore has far-reaching consequences for the global software supply chain.
Technical Information
The CVE-2025-10894 attack chain began when attackers exploited a GitHub Actions workflow in the Nx repository. The workflow used the pull_request_target trigger, which grants elevated permissions (including a writable GITHUB_TOKEN) to workflows running on pull requests from forks. Attackers crafted pull requests whose titles contained bash injection payloads. When the workflow ran, it processed the malicious title, and the payload executed arbitrary commands inside the CI environment.
That access let the attackers exfiltrate npm publishing tokens from the workflow environment. They used the tokens to publish malicious versions of Nx and related plugins to the npm registry. The affected packages included post-install scripts (such as telemetry.js or embedded code in bundle.js) that ran automatically on installation.
The malware payload did the following:
- Scanned the file system for sensitive credentials, including:
- SSH private keys
- GitHub personal access tokens
- npm authentication tokens
- Cloud provider credentials (AWS, GCP, Azure)
- Cryptocurrency wallet files (MetaMask, Electrum, Ledger, Trezor, Exodus, Phantom, Solflare)
- Exfiltrated the collected credentials by creating new GitHub repositories under the victim's account and uploading the data as repository content
- Checked for AI command-line tools (Claude, Gemini, Amazon Q) and, when they were present, used them for further reconnaissance
- Skipped Windows and ran only on macOS and Linux
- Tried to persist by injecting malicious workflow files into GitHub repositories
The campaign escalated when a self-replicating worm, Shai-Hulud, used harvested npm credentials to infect more packages. Over 500 npm projects were compromised. The worm automatically found the packages each victim could publish to, injected malicious code, and published new versions, which widened the attack's reach.
No public code snippets are available for the exact exploit payloads, but vendor advisories and security research document the attack chain well.
Affected Systems and Versions
- Nx build system npm package: eight versions published between August 21 and August 26, 2025 (the exact version numbers are in the official advisory)
- Related Nx plugins published in the same timeframe
- Over 500 npm packages compromised by the Shai-Hulud worm (see StepSecurity and Wiz for lists)
- Vulnerable configurations: any project or CI/CD pipeline that installed the affected versions during the compromise window, especially on macOS or Linux
Vendor Security History
Nrwl (Nx) has a generally strong security track record. Workflow misconfigurations have caused supply chain risk in the npm ecosystem before, and earlier incidents involved similar misuse of GitHub Actions triggers. Nrwl responded quickly by revoking tokens, adopting npm Trusted Publisher, and publishing a detailed postmortem. The npm registry has faced supply chain attacks before this one, and the risk to the ecosystem is ongoing.
References
- NVD Entry for CVE-2025-10894
- Red Hat Supply Chain Attacks on NPM Packages
- Red Hat Bugzilla 2396282
- Nx Security Advisory GHSA-cxm3-wv7p-598c
- StepSecurity Blog: Nx Build System Compromised
- Wiz Blog: S1ngularity Supply Chain Attack
- StepSecurity: ctrl-tinycolor and 40+ npm packages compromised
- Wiz: Shai-Hulud npm supply chain attack



