Hijacked GitHub Accounts Used npm Hooks to Slip Past Workflow Approval
GitHub's approval gate did its job here, and the attackers walked around it. A campaign built on hijacked accounts planted a secret-stealing payload in at least 1,806 repositories, and in many of them the code ran anyway. The entry point wasn't a workflow file the platform could flag. It was an npm hook.
Aikido Security detected the campaign. Its researchers said the attackers used 4,837 compromised accounts to open probe pull requests across 61,764 repositories starting Nov. 10. About 92% of those pull requests, titled "docs: dependency audit notes," are still open, which suggests most maintainers never looked at them.
The probes were reconnaissance. They checked which hijacked accounts had write access to which repositories, so the attackers could follow up with commits carrying the real payload. That payload is a 1,500-line shell script built to collect GitHub Actions secrets, cloud credentials, and API keys for AI services and developer tools.
The delivery came in at least three forms: modifications to existing GitHub Actions workflows, a postinstall hook in package.json that fires on any npm install, and a throwaway branch carrying a rogue workflow designed to run.
"We've identified indications that the payload ran in at least 1,806 repositories, but this number may understate impact," the Aikido researchers said in their report. "The run log was deleted in impacted repositories, meaning the threat actor has likely collected the credentials and covered its tracks."
The npm hook that slipped past GitHub
GitHub's protection against this class of attack held up for the payloads it could see. The platform has already blunted recent workflow-injection campaigns by requiring explicit approval before malicious workflows run. GitGuardian found that all seven November payload runs still visible in workflow files sat in an action_required state and never started.
"GitHub held the workflow forms, but an npm hook slipped past the hold and ran," said Gaetan Ferry, a security researcher at GitGuardian, in an analysis.
That's the blind spot. The npm hook didn't touch any workflow file. The attacker dropped a hidden script into the repository root and added a single line to package.json. The repository's own, unchanged workflows already ran npm install as routine build hygiene, so the hook executed on schedule. Approval gates that inspect workflow definitions never saw it coming.
The attacker also changed exfiltration by Thursday. The newest payload sends stolen data only to a Telegram chat, and the HTTP callback now points to a dead address. Blocking the IP addresses published earlier no longer stops the current versions. If your detection rules are built around those indicators, they're already stale.
What the malware takes
Once running, the script dumps the workflow's secrets object as JSON, which hands over every repository and organization secret the job can reach. It also scans the memory of the runner process. That matters because runners hold secrets in decrypted form, including ones the workflow never referenced. The script then collects credential files from well-known paths, shell histories, and API keys for OpenAI, Anthropic, Copilot, and Cursor.
The cloud reach is where this gets expensive. The script exchanges OIDC tokens for AWS, GCP, and Azure sessions, mints new long-lived AWS access keys, impersonates GCP service accounts, and replays cached Azure refresh tokens to reach Microsoft Graph and Key Vault.
Everything gets packed into a gzipped archive and shipped out, and then the script cleans up after itself. In most repositories, the attacker reverted the malicious commit within a minute and deleted the workflow run and its logs. A maintainer skimming commit history after the fact might never see a trace.
Backdoors that survive credential rotation
Here's the thing: rotating secrets alone won't close this. The script sets up access that outlasts the stolen credentials. On AWS, it rewrites the assumed role's trust policy to accept any AWS account, which effectively opens the role to anyone. It also calls iam:CreateAccessKey to mint long-lived keys for IAM users.
On Azure, it injects federated identity credentials named wfx-ci-* into applications and points them back at the compromised repository. Any workflow in that repository can then authenticate to Azure without a stored secret, even after every token has been rotated.
If a probe pull request or any of the campaign's commit strings show up in a repository you control, assume every secret that repository's workflows could reach has been stolen. Rotate repository and organization secrets, package registry tokens, and cloud keys. Because the memory scan grabs more than what workflows reference, the real exposure list is wider than the one your pipeline config suggests.
Then go hunting for the persistence mechanisms: AWS role trust policies that accept any account, IAM access keys created since Nov. 10, and Azure federated credentials named wfx-ci-*.
"Ensure all logs are enabled, particularly audit logs on cloud admin behavior," said Ramy Rahman, senior principal solutions engineer at ArmorCode. "Inspect audit logs where possible (specifically in AWS and Azure, as persistence is possible) to ensure the malicious payload did not run."
The wfx-loot payload also shipped inside published packages: the Packagist package neuronai-studio 3.14.3, and the Go modules docker-env and gocurl. In the Go modules, the payload lives only in a workflow file that Go tooling never executes, so consumers there may be unaffected. Anyone who installed the Packagist version should treat that machine as compromised.
Account overlap points to a broader pool of compromised credentials. GitGuardian said about a fifth of the GitHub accounts used in this campaign had already been compromised during the GhostAction attack in October. Separately, StepSecurity traced 173 of the probe pull requests to tokens issued to the Fly.io GitHub App.
Fly.io confirmed those tokens leaked when its deploy process left them in .git/config files inside build directories that some apps served publicly. The company said it wasn't breached. GitHub's bulk revocation of the Fly.io app tokens stopped partway through, so some of that token pool may still work.
The practical lesson is that npm install in CI is code execution, and lifecycle scripts deserve the same scrutiny as workflow files. Audit which pipelines run package installs with access to production secrets, and consider disabling install scripts where the build doesn't need them. The attackers didn't need to break GitHub's controls. They only needed a hook that ran where nobody was looking.