Skip to content
← RegistryDossier · 6 steps · 5 edges

Leaked GitHub PAT → org takeover → supply-chain push

A maintainer's PAT lands in a public Gist (or a Docker image layer). The token has repo + workflow scopes — push a malicious commit to a popular package, fire the auto-publish workflow.

Filed by AD Knowledge Base
§ Kill-chainDrag · zoom · scroll

§ Context

Assumed environment: target maintainer uses a classic PAT (rather than fine-grained) with broad scopes, no IP allow-list, and SSO not enforced for personal tokens. Repo runs an auto-publish workflow on push to main.

§ Steps

  1. 01
    GET /user/repos → confirm reachDiscovery
    T1087Account Discovery
  2. 02
    Dork GitHub / Gist for ghp_ + ghu_ prefixesReconnaissance
    W-RECON-GITHUB-DORKGitHub / GitLab Dorking
  3. 03
    Auto-publish workflow ships malicious versionInitial Access
    SUP-NPM-TYPOSQUATnpm / PyPI / RubyGems Typosquat
  4. 04
    Downstream installs run the payloadExecution
    SUP-INSTALL-SCRIPTMalicious Install Script
  5. 05
    Push malicious commit to popular repoInitial Access
    SUP-PACKAGE-TAKEOVERPackage Maintainer Takeover
  6. 06
    Identify a maintainer PAT with broad scopeCredential Access
    SAAS-GH-PAT-LEAKGitHub Personal Access Token Leak

§ References

§ Frequently asked

What is the "Leaked GitHub PAT → org takeover → supply-chain push" attack path?
A maintainer's PAT lands in a public Gist (or a Docker image layer). The token has repo + workflow scopes — push a malicious commit to a popular package, fire the auto-publish workflow. It chains 6 steps drawn from real-world offensive-security techniques.
What starting position does this attack require?
The first step is GET /user/repos → confirm reach (T1087) — a discovery primitive. Assumed environment: target maintainer uses a classic PAT (rather than fine-grained) with broad scopes, no IP allow-list, and SSO not enforced for personal tokens.
What is the final impact of this kill-chain?
The final step lands on Identify a maintainer PAT with broad scope (SAAS-GH-PAT-LEAK), which falls under Credential Access. From here, an operator typically pivots into post-exploitation or maintains persistence.
How can defenders detect or prevent this attack?
Detection and prevention vary per step. Refer to each linked MITRE ATT&CK entry under "References" — every technique on that page lists defensive controls, detection telemetry, and known threat-actor usage.

§ Related dossiers