Wiz Details Nx Supply-Chain Attack’s Impact and AI-Assisted Data Theft

· Original article ↗

Summary

Wiz reports that malicious Nx packages exposed secrets and private repositories through a three-phase attack. Its analysis found AI-assisted file discovery succeeded in under a quarter of cases, while many leaked credentials remained valid.

Key points

  • The attacker used a compromised npm publishing token, obtained via a vulnerable GitHub Action, to distribute malicious Nx package versions.
  • In Phase 1, secrets from over 1,700 users were publicly exposed; Wiz says more than 2,000 unique verified secrets were leaked.
  • Phase 2 involved at least 480 compromised accounts making over 6,700 private repositories public; Phase 3 exposed over 500 repositories belonging to one organization.
  • Wiz found almost 90% of leaked GitHub tokens remained valid more than 24 hours after the repositories were removed; after GitHub’s revocation effort, roughly 5% remained valid.
  • Malware used installed AI command-line tools to identify files for exfiltration. Wiz says this succeeded in under a quarter of cases, yielding fewer than 100 unique valid secrets across 20,000 files.
  • Wiz recommends reviewing GitHub Audit Logs for phase-specific repository events, rapid cloning activity, and credential deauthorization events attributed to “github-staff.”
  • The activity had lulled, but Wiz warns exposed secrets and data in formerly private repositories could enable further attacks; it reported that over 40% of leaked npm tokens from Phase 1 remained valid.

Article Details

Attack Vectors
  • The attacker compromised an npm publishing token for Nx packages through a vulnerable GitHub Action, then published malicious package versions.
  • Malware in the malicious packages collected environment variables and GitHub and npm tokens, and used the GitHub CLI to publish stolen data in public repositories on victims’ GitHub accounts.
  • The attacker used leaked GitHub tokens to make victims’ private repositories public.
  • The malware used locally configured AI command-line tools to identify files for possible exfiltration.
  • During the initial compromise of Nx’s npm token, the attacker appears to have used webhook.site for remote exfiltration.
Defensive Notes
  • Review GitHub Audit Logs for the s1ngularity string in the repo field of repo.create events (Phase 1) and repo.access events (Phase 2).
  • Investigate instances of a single user cloning a wide set of repositories in a short timeframe.
  • Review GitHub Audit Logs for org_credential_authorization.deauthorize events associated with the “github-staff” actor_id.
  • Assess and rotate exposed credentials, including GitHub and npm tokens; the article reports that some remained valid after the exposed repositories were removed.

Indicators of compromise

TypeIndicatorContext
DOMAINwebhook[.]siteReportedly used by the attacker for remote exfiltration during the initial compromise of Nx’s npm token.

MITRE ATT&CK

Vendors

Products

Tools

Related Articles