# Nx "s1ngularity"

incident, `incident:nx-s1ngularity`. Page: https://ghtier.com/incidents/nx-s1ngularity

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.

**Abused:** [Contents: Write (repository)](https://ghtier.com/tier/permissions/contents-write.md) (Tier 2), [Actions: Write (repository)](https://ghtier.com/tier/permissions/actions-write.md) (Tier 1)

**Used:** [Delete branches and workflow runs](https://ghtier.com/attack-paths/technique-delete-runs.md) (Tier 1), [Run PR code in a privileged workflow](https://ghtier.com/attack-paths/technique-pwn-request.md) (Tier 1), [Post stolen data to a new public repository](https://ghtier.com/attack-paths/technique-exfil-public-repo.md) (Tier 1), [Trigger the publish workflow from a tampered branch](https://ghtier.com/attack-paths/technique-dispatch-publish.md) (Tier 1), [Publish a malicious version with a stolen token](https://ghtier.com/attack-paths/technique-malicious-release.md) (Tier 1), [Flip private repos to public](https://ghtier.com/attack-paths/technique-visibility-flip.md) (Tier 0), [Start a privileged publish job by hand](https://ghtier.com/attack-paths/escalation-dispatch-to-publish.md) (Tier 1), [Flip private repositories to public](https://ghtier.com/attack-paths/escalation-admin-to-public.md) (Tier 0)

**Sources:**
- [s1ngularity: what happened, how we responded, what we learned](https://nx.dev/blog/s1ngularity-postmortem)
- [s1ngularity: supply chain attack leaks secrets on GitHub (Wiz)](https://www.wiz.io/blog/s1ngularity-supply-chain-attack)
- [Learnings from recent npm compromises](https://securitylabs.datadoghq.com/articles/learnings-from-recent-npm-compromises/)
- [OIDC trust chain abuse: cloud takeover](https://labs.cloudsecurityalliance.org/research/csa-research-note-oidc-trust-chain-abuse-cloud-takeover-2026/)

From ghtier (https://ghtier.com). Every entry and link: https://ghtier.com/data/graph.json. Tiers: https://ghtier.com/tier.
