GhostAction Attackers Hack 500 GitHub Accounts to Steal API Keys

GhostAction Attackers Hack 500 GitHub Accounts to Steal API Keys

Security researchers observed an initial surge of attacks affecting 346 repositories through compromised maintainer accounts such as henrywoo and kitao on October 8. This sophisticated campaign, which began in early October 2026, has quickly scaled to compromise more than 500 distinct GitHub accounts. By infiltrating these accounts, the threat actors managed to inject malicious CI/CD workflows into tens of thousands of repositories, effectively turning standard development automation into a tool for massive data exfiltration. The primary objective of this operation is the systematic theft of high-value secrets, including cloud infrastructure credentials, GitHub Actions secrets, and API keys for prominent artificial intelligence services. As modern development increasingly relies on integrated third-party platforms, these API keys represent the keys to a kingdom of compute resources and sensitive training data. The scale of the GhostAction campaign underscores a growing trend where attackers target the supply chain by leveraging the inherent trust found within the open-source community.

1. Analyzing the Mechanics of GhostAction Infiltration

The attackers utilized a strategic approach by targeting maintainer accounts with significant permissions, allowing them to bypass traditional security hurdles. Notable repositories such as uber/athenadriver and kitao/pyxel were among those initially identified as victims of this credential harvesting scheme. Once access was gained, the threat actors committed a file named security-audit.yml directly to the default branches of the targeted repositories. To avoid immediate detection, they utilized deceptive commit messages like “Add security audit workflow,” preying on the common practice of developers adding security-focused tools to their pipelines. This malicious workflow was designed to trigger on push events without any branch or path restrictions, and it also supported manual execution via the workflow_dispatch event. By mimicking legitimate security practices, the attackers were able to maintain a foothold within the organizations for an extended period before the suspicious activity was finally flagged by automated monitoring tools.

Deep technical analysis revealed that the malicious payloads were specifically tailored to the environment of each repository. Before deployment, the attackers inspected existing workflows to identify specific referenced Action secrets, which they then inserted into a reusable harvesting script. In the case of the Pyxel repository, the workflow targeted highly sensitive tokens such as CARGO_REGISTRY_TOKEN, PERSONAL_ACCESS_TOKEN, PYPI_PASSWORD, and PYPI_USERNAME. This level of customization allowed for potential exposure across multiple platforms including GitHub, PyPI, and crates.io. A newer variant of the attack even includes a repository scanning stage that uses the actions/checkout tool to retrieve the entire history across all branches and tags. The script examines working-tree files and patch outputs from the git log, looking for patterns related to AWS access keys, Anthropic API tokens, and Slack credentials. This thoroughness ensures that even if a secret was removed from the current codebase, it could still be recovered from historical commits.

2. Implementing Robust Defensive and Remediation Actions

To effectively mitigate the risks posed by this campaign, defenders had to prioritize the immediate elimination of all fraudulent workflows from their systems. This involved searching for and deleting any files located at .github/workflows/security-audit.yml or similar paths used by the threat actors. Beyond simple deletion, it was necessary to examine the run history and execution logs to determine if the malicious scripts were triggered and exactly what data might have been accessed during those sessions. Following the identification of a breach, organizations moved to terminate all compromised sessions and revoke access for any user accounts involved in the incident. A critical step followed: the full rotation of all exposed passwords and keys, including AWS identifiers and AI API tokens from providers like OpenAI and Anthropic. Because the malware scanned the entire repository history, security teams had to use specialized tools to scrub secrets from the Git history rather than just removing them from the most recent versions.

Once the immediate threat was neutralized, administrators conducted thorough audits of software releases on platforms like PyPI to ensure that no unauthorized package versions were published. They also monitored cloud activity logs, such as AWS CloudTrail, for any unusual patterns originating from potentially stolen credentials. On a network level, security teams blocked communication with the known attacker-controlled IP address 193.32.204[.]199 to prevent further exfiltration. To bolster future defenses, many organizations activated automated protection features like secret scanning and push protection to prevent accidental uploads. They also implemented more rigorous inspection protocols for repository forks before enabling GitHub Actions to ensure no malicious code was inherited. Finally, comprehensive organization-wide reviews of account permissions helped to limit the potential blast radius of any future compromises. These steps ensured that the vulnerabilities exploited by GhostAction were closed and the long-term integrity of the development environment was fully restored.

Subscribe to our weekly news digest.

Join now and become a part of our fast-growing community.

Invalid Email Address
Thanks for Subscribing!
We'll be sending you our best soon!
Something went wrong, please try again later