Zero Day Room
Live
Threats

Gheist Campaign Exploits GitHub Token Abuse

A campaign dubbed Gheist has used stolen GitHub tokens to plant malicious workflows across thousands of repositories, bypassing GitHub's public repository protections to target private environments and cloud credentials.

A campaign dubbed Gheist has used stolen GitHub tokens to plant malicious workflows across thousands of repositories...

Wiz Research has tracked the Gheist campaign since September 15, 2026, which leverages stolen GitHub tokens to plant malicious workflows across repositories. The campaign has compromised over 850 accounts and planted more than 13,500 branches, with activity still ongoing and evolving. Since July 28, GitHub has held potentially malicious workflow runs in public repositories until approval, but Wiz said, "The protection does not extend to private repositories or GitHub Enterprise Server."

Attackers cycled through stolen user and automation account tokens to access private repositories. They created branches and committed a workflow named sync-check to every accessible repository. This workflow printed repository secrets to its own log. The attackers' tool, using a user agent named 'gheist', then downloaded the log via the GitHub API and deleted the run seconds later, avoiding external command-and-control servers. CloudTrail logs show organizations' own workflows running on these malicious branches and assuming AWS roles, proving execution occurred without approval in private environments.

Attack Mechanics

The attackers plant branches with names following the pattern 'ci-sync-' followed by six random characters. They commit a workflow file .github/workflows/sync-check.yml, with the commit message 'ci: sync config'. This workflow's job is to print repository secrets to the workflow log. The entire operation is swift; workflow runs on these ci-sync-* branches are typically deleted within a minute of creation. Defenders can detect this activity through GitHub audit logs showing these deleted runs and activity from the 'gheist' user agent.

Scope and Impact

The scale of the Gheist campaign is significant. More than 13,500 branches were planted across repositories using stolen GitHub tokens. Over 850 compromised accounts were tracked since the campaign's start on September 15. As of October 24, roughly two-thirds of those implicated accounts were no longer available on GitHub, likely due to response activity. The recovered branches spanned personal projects and enterprise repositories. Cloud credentials from compromised organizations were also used to enumerate AWS Secrets Manager, and some accounts were linked to other malicious activities like malware distribution and cryptomining.

Tool Variants and Evolution

Researchers have observed two distinct variants of the attack tool, with Tool B introducing more advanced features.

On October 19, Tool B added a command to print a specific separator and later pushed a second, buggy job named sync-host. This job targets repositories with registered self-hosted runners by setting runs-on: self-hosted. It performs recursive searches for 31 different token formats, private keys, and credential files but contains flaws in its runner key file lookup and fails to collect certain cloud tokens. The job writes three helper files (.gdmp_pat .gdmp_patg .gdmp_sweep) and logs each stage under a specific header.

Detection and Response

Defenders have several methods to hunt for Gheist activity. Key indicators include branches named 'ci-sync-[0-9a-z]{6}', commits adding the sync-check.yml file, and workflow runs deleted almost immediately. For environments with self-hosted runners, detection requires looking for the .gdmp helper files and 'gdmp-pivot' strings in job logs. Recommended response actions are comprehensive: rotate all repository, organization, and environment secrets immediately. Revoke all personal access tokens and fine-grained tokens, and check token owners' devices for infostealer malware. Treat any compromised self-hosted runner as fully compromised. Avoid approving or executing any workflow from a ci-sync-* branch.

Hardening recommendations include requiring reviewers for environments holding production secrets and scoping OIDC trust policies strictly to protected branches and environments. Organizations should prefer GitHub Apps or short-lived, fine-grained personal access tokens over classic tokens. Self-hosted runners should be run as ephemeral hosts without Docker socket or unrestricted metadata server access. The Gheist campaign remains distinct from other threats like GhostAction, which uses different techniques. Continued monitoring is essential as the Gheist campaign evolves with new tool variants and attack techniques.

Topics

#Threats

Related coverage

More from Threats