What happened
On 2025-08-26, malicious versions of the npm package Nx, a widely used build tool, and related packages were published. According to the advisory from the Nx maintainers, the code scanned the file system, collected credentials, and posted them as a repository in the victim’s GitHub account. The malicious versions were published to npm and taken down within hours. No source identifies the attacker.
The advisory attributes the root cause to a flaw in Nx’s own GitHub Actions configuration. An npm publishing token was taken from the vulnerable workflow, which led to the malicious versions being published. StepSecurity also reported a second wave using the leaked credentials on 2025-08-28.
What the AI did
StepSecurity reports that the malware looked for AI CLIs installed on the developer’s machine (Claude, Gemini, and q, the name as written in the source) and called them to find the location of sensitive files. The AI CLIs were run with dangerous options that skip user confirmation.
StepSecurity describes this as one of the first known cases of malware abusing AI CLIs. The source goes only as far as the malware handing file discovery to the AI with a fixed prompt. It does not say the AI carried out several stages of the attack on its own. Because the malware called the AI CLI on the machine at runtime without human action, this site rates AI involvement as “Semi-autonomous.” The Nx advisory doesn’t mention the abuse of AI CLIs.
Why this confidence grade
StepSecurity, the company that investigated, analyzed the malware code and reports the code that calls AI CLIs, so the case is graded Confirmed. The Nx maintainers’ advisory confirms the compromise itself but doesn’t mention the abuse of AI CLIs.
What to check
- If you might have installed an affected version, follow the Nx advisory. Check your GitHub security log for repositories created with the matching name, and rotate the credentials that were on the machine, such as GitHub and npm tokens.
- If you have AI CLIs installed on the machine, StepSecurity recommends checking your shell history for launches that use options that skip confirmation. It also lists the AI CLIs’ API keys as something to rotate.