← INCIDENTS

Gheist campaign uses stolen GitHub tokens to dump repository secrets through planted workflows

Wiz Research has tracked a campaign called Gheist since September 15 that takes a stolen GitHub token, commits a workflow named sync-check to every repository the token can reach and prints the repository's secrets into the workflow log before deleting the run. Wiz recovered more than 13,500 planted branches from over 850 compromised accounts and saw successful exploitation in private repositories and enterprise environments.

For each repository, the tool creates a branch named ci-sync- plus six random characters and commits .github/workflows/sync-check.yml with the message ci: sync config. The push triggers a job that prints the environment and the repository's secrets encoded in base32, which gets around GitHub's masking because GitHub hides secret values only when they appear verbatim. Where a repository has deployment environments, the tool lists them so that environment-scoped secrets, often production credentials, are printed too. The tool then downloads the log through GitHub's API and deletes the run seconds later, so nothing leaves through an attacker-controlled domain that could be blocked.

Wiz saw two variants running in parallel. On October 19 the second added a separator line for the operator's log parser and, hours later, a second job named sync-host that runs on self-hosted runners. That job searches the host for 31 token formats, including keys for AI providers such as Anthropic, Hugging Face, Groq and NVIDIA, as well as private keys, .env files, Terraform state and shell history, reads the environment of every process, uses the Docker socket to mount the host's root filesystem and collects cloud metadata credentials.

A recent GitHub control is blocking the exploitation in public repositories, but Wiz saw successful exploitation and follow-on activity in private repositories and GitHub enterprise environments. In enterprise organizations the tool cycled through the tokens of several users and automation accounts within minutes and cloned private repositories before planting the workflow, and hours later cloud credentials from the same organization were used to enumerate AWS Secrets Manager. As of October 24 the attack was ongoing, roughly two thirds of the implicated accounts were no longer available on GitHub, and Wiz had reported the activity to GitHub.

Sources

  1. Wiz: Gheist, attempted scaled abuse of stolen GitHub tokens stumbles wiz.io
← More INCIDENTS news