Malicious Nx packages direct local AI coding assistants to find secrets

Malicious Nx packages direct local AI coding assistants to find secrets

Developers' own AI coding assistants were used by malware as reconnaissance tools, with their approval prompts switched off by command-line flags.

26 August 2025HappenedHijacked by content
Claude Code, Gemini CLI and Amazon Q CLI, invoked by malicious versions of the Nx npm package · Nx / Nrwl (compromised package); AI CLIs from Anthropic, Google and AWS · Global
What happened
Actual exploitation in the wild. On 26 August 2025, malicious versions of the nx build system and several plugins were published to npm for about four hours after attackers abused a GitHub Actions workflow injection in the Nx repository. A post-install script checked for installed AI command-line tools and ran them with permission-bypassing flags (–dangerously-skip-permissions, –yolo, –trust-all-tools) and a prompt telling them to search the filesystem and list configuration and credential files. The collected data was encoded and published to public GitHub repositories named 's1ngularity-repository' under the victims' own accounts. On 28-29 August, stolen GitHub tokens were used to make more than 5,500 private repositories public.
Response
Nx removed the malicious versions and published advisory GHSA-cxm3-wv7p-598c (CVE-2025-10894) on 27 August 2025, the day after publication; GitHub archived or made private the exfiltration repositories.
Discovered by
Nx maintainers and community reports; analysed by Wiz, StepSecurity, Snyk and other security firms.
Who was affected
Developers who installed affected Nx versions; over 1,000 valid GitHub tokens and dozens of cloud and npm credentials leaked; 5,500+ private repositories of 400+ users and organisations made public in a second phase
Patterns
Supply chainDirected by people to cause harmCredentials exposedData left the systemWorked around a safeguard
Confidence: high · checked 24 September 2026. Published under CC BY 4.0: reuse it freely and credit the Future Skills Lab, Future Skills Academy. Seen an error or a newer development? Write to tellmemore@futureskills.academy.

Related

Incidents with the same pattern

What does this ask of people?

Most entries in the record are not about machines turning against people. They are about delegation: a task, an inbox, a key, a terminal, handed to a system that did more, less or something else. Futures literacy starts with noticing that.

All 177 incidents →The Future Skills Lab