ghtier

These write-ups are not threat intelligence and are not kept up to date as an incident develops. They are here to show how each attack worked, so you can find and fix the same techniques in your own setup. For the latest on an incident, read its sources.

← All incidents

Nx "s1ngularity"

August 2025 · Contained

An injectable pull_request_target workflow left on an old branch gave the attacker a write token, which ran Nx's publish job and handed over its npm token. The malicious versions used developers' own AI tools to search their machines for credentials.

Access held
T0repoT1Actions: WriteT2Contents: WriteNPM_TOKENnpm, SSH and cloud credentials
Full summary

No zero-days were involved. A pull_request_target workflow that put pull request titles into a shell step was still on an old branch of the Nx repository, and its GITHUB_TOKEN could write because the repository kept GitHub's old read and write default. The attacker used that token to run the publish workflow on a branch of their own, took NPM_TOKEN and published malicious Nx versions. Their install script used developers' own AI command line tools to search the machine for credentials and posted what it found to new public repositories in each victim's GitHub account. The stolen GitHub tokens were then used to make thousands of private repositories public.

How it unfolded

Pick a step to zoom into it. A dashed line is a step the sources do not state. Blue dots are the checklist items that break the step.

Whole path

Untrusted input reaches aprivileged workflowway inRun PR code in a privilegedworkflowtechniqueContents: WritePR title check's tokenActions: WriteThe same tokenStart a privileged publishjob by handescalationNPM_TOKENThe publish job's secretDelete branches andworkflow runstechniqueDelete code or cover tracksPublish a malicious versionwith a stolen tokentechniqueCompromised Action orpackageway inrepoVictims' gh CLI tokensnpm, SSH and cloudcredentialsVictims' machines, CIPost stolen data to a newpublic repositorytechniqueFlip private repositoriesto publicescalationRead or expose private code

The whole attack, one row per step. Pick a step on the left, or click a box in its row.

Sources

Reported by: Mandiant (UNC6426, downstream follow-on)