Blog

AI-powered malware hit 2,180 GitHub accounts in “s1ngularity” attack

Investigations into the Nx “s1ngularity” NPM supply chain attack have unveiled a massive fallout, with thousands of account tokens and repository secrets leaked.

According to a post-incident evaluation by Wiz researchers, the Nx compromise has resulted in the exposure of 2,180 accounts and 7,200 repositories across three distinct phases.

Wiz also stressed that the incident’s scope of impact remains significant, as many of the leaked secrets remain valid, and so the effect is still unfolding.

The Nx “s1ngularity” supply chain attack

Nx is a popular open-source build system and monorepo management tool, widely used in enterprise-scale JavaScript/TypeScript ecosystems, having over 5.5 million weekly downloads on the NPM package index.

On August 26, 2025, attackers exploited a flawed GitHub Actions workflow in the Nx repository to publish a malicious version of the package on NPM, which included a post-install malware script (‘telemetry.js’).

The telemetry.js malware is a credential stealer targeting Linux and macOS systems, which attempted to steal GitHub tokens, npm tokens, SSH keys, .env files, crypto wallets, and upload the secrets to public GitHub repositories named “s1ngularity-repository.”

What made this attack stand out was that the credential-stealer to used installed command-line tools for artificial intelligence platforms, such as Claude, Q, and Gemini, to search for and harvest sensitive credentials and secrets using LLM prompts.

LLM prompt to search for and steal credentials and other secrets
LLM prompt to search for and steal credentials and other secrets
Source: Wiz

Wiz reports that the prompt changed over each iteration of the attack, showing that the threat actor was tuning the prompt for better success.

“The evolution of the prompt shows the attacker exploring prompt tuning rapidly throughout the attack. We can see the introduction of role-prompting, as well as varying levels of specificity on techniques,” explained Wiz.

See also  An extra 5 million age checks a day are being completed thanks to the UK's Online Safety Act

“These changes had a concrete impact on the success of the malware. The introduction of the phrase “penetration testing”, for example, was concretely reflected in LLM refusals to engage in such activity.”

A massive blast radius

In the first phase of the attack, between August 26 and 27, the backdoored Nx packages directly impacted 1,700 users, leaking over 2,000 unique secrets. The attack also exposed 20,000 files from infected systems.

GitHub responded by taking down the repositories the attacker created after eight hours, but the data had already been copied.

Between August 28 and 29, which Wiz defines as phase 2 of the incident, the attackers used the leaked GitHub tokens to flip private repositories to public, renaming them to include the ‘s1ngularity’ string.

This has resulted in the further compromise of another 480 accounts, the majority of which were organizations, and the public exposure of 6,700 private repositories.

In the third phase, which began on August 31, the attackers targeted a single victim organization, utilizing two compromised accounts to publish an additional 500 private repositories.

Overview of attack and impact
Overview of the s1ngularity attack
Source: Wiz

Nx’s response

The Nx team published a detailed root cause analysis on GitHub explaining that the compromise came from a pull request title injection combined with the insecure use of pull_request_target.

This allowed the attackers to run arbitrary code with elevated permissions, which in turn triggered Nx’s publish pipeline and exfiltrated the npm publishing token.

The malicious packages were removed, the compromised tokens were revoked and rotated, and two-factor authentication has been adopted across all publisher accounts.

To prevent a recurrence of such a compromise, the Nx project has now adopted NPM’s Trusted Publisher model, which eliminates token-based publishing, and added manual approval for PR-triggered workflows.


Source link

Back to top button
close