General Security

The wfx CI secret stealer: how it works, how to check your repos, and how to make it fail next time

12. Nov 2026

On November 10, 2026, someone started using thousands of stolen GitHub credentials to plant a CI secret stealer in every repository those accounts could write to. Aikido counted 4,837 compromised accounts and probe pull requests in 61,764 repositories within about 26 hours. The payload ran, and secrets were exfiltrated, in at least 1,806 repositories.

The attack needs no vulnerability in GitHub. It needs a token that is allowed to push, and a CI system that runs whatever is pushed with the secrets the repository holds. Most organizations have both, which is why the attack matters even to those whose repositories came out clean.

We scanned every repository we have access to, including the K8up project. This post explains what the attacker does, how the scanner we wrote finds the traces, and which settings would have stopped the attack.

How the attack works

1. Probe. The attacker opens a pull request titled docs: dependency audit notes from a branch named wfx-docs. If that succeeds, the stolen token can write to the repository. Most of these PRs were still open when Aikido published, so most owners had not noticed.

2. Payload. One of three variants follows:

  • Workflow injection: a commit ci: refresh build cache adds about 1,500 lines to an existing workflow. The injected step hands ${{ toJSON(secrets) }} and ${{ toJSON(vars) }} to a script that POSTs them to http://194.150.166.244:8080/exfil (or to 18.143.168.96, same port and path).
  • Install hook: a commit chore: add ci helper adds a .ci-xxxxxx.sh script and a postinstall entry in package.json. Any npm install runs it, in CI and on developer laptops.
  • Throwaway branch: a commit chore: add dependency audit workflow adds .github/workflows/build-audit-xxxxxx.yml on a branch named chore/ plus eight random characters. A workflow triggered by push runs on that branch with the repository’s secrets, without touching main.

3. Cleanup. Within at most a minute the attacker reverts the change and deletes the workflow run and its logs. The repository looks untouched. Often the only remaining trace is a gap in the workflow’s run numbers.

4. Escalation and persistence. The stealer, which calls itself “wfx” in its logs and variable names, does more than read secrets. It collects the GITHUB_TOKEN, the OIDC and Actions runtime tokens, credential files, and the environment and memory of the runner processes. It exchanges the OIDC token for AWS, Google Cloud and Azure credentials. Then it entrenches itself: it creates long-lived AWS access keys, rewrites role trust policies to "Principal": {"AWS": "*"}, adds Azure federated identity credentials named wfx-ci-…, and posts forged success statuses under the names of the repository’s required checks.

A repository with no cloud secrets in it can therefore still lead into a cloud account, if any of its workflows can assume a role through OIDC.

Checking your repositories

Because the attacker cleans up, the current state of a repository proves little. We wrote wfx-compromise-scan, a single Python file with no dependencies, which reads the history GitHub keeps:

  • pull requests created since November 10, by title and head branch
  • repository events, which keep branch creations, deletions and pushes after the branch is gone
  • commit messages on the default branch and on any suspicious branch still present
  • workflow runs since November 10, and gaps in each workflow’s run numbers, which show runs that someone deleted
  • artifacts and Actions caches named wfx*
  • file names and file contents: the exfiltration IPs, the WF_CALLBACK and WF_CTOKEN variables, the stealer’s SHA256, postinstall hooks calling .ci-* scripts, and the file names of the October “GhostActions” wave, whose workflows the November payload was injected into in more than 100 repositories
uv run wfx_scan.py                      # all repos your token can see
uv run wfx_scan.py --org k8up-io --all  # one organization, every repo

By default it deep scans only the repositories pushed to since November 10. Every push, revert and branch deletion updates that timestamp, so a repository the attacker touched cannot fall below the cutoff. A GitHub search for the probe PR title runs across every owner the token can see, deep scanned or not.

Our result: the search covered 748 repositories across 9 owners, the 83 pushed to since November 10 were deep scanned, and nothing was found. For K8up we deep scanned every repository except one archived one. One of them, a private security advisory fork, returned 404 for every Actions endpoint, so we list its Actions checks as unverified. Its pull requests, events, branches, commits and files are clean, and so is every other K8up repository.

The scanner has limits, and the README lists them. The events API keeps at most 300 events from the last 90 days, so a busy repository can lose the relevant ones. Persistence outside the repository is not checked either: IAM keys, trust policies and federated credentials have to be checked in the cloud accounts, and forged commit statuses in GitHub, by looking for success statuses on your required checks that your CI never posted. A check that could not run is reported as unverified, never as clean.

If the scanner does find something, assume every secret, variable and cloud role reachable from that repository’s workflows is compromised, and rotate all of them.

Making it fail next time

The attack chains several defaults, and breaking any single link would have stopped it. Starting with the cheapest:

Keep secrets away from branches anyone can create

The throwaway-branch variant works because repository secrets are available to every branch. Move secrets that matter into environments with deployment branch rules that allow only main (or release tags), and add required reviewers for production. A workflow on chore/a1b2c3d4 then gets nothing.

Pin OIDC trust to a branch or environment

If a workflow assumes a cloud role through OIDC, the cloud-side trust policy decides who gets in. Match the sub claim exactly, for example repo:org/repo:environment:production or repo:org/repo:ref:refs/heads/main, never repo:org/repo:*. A wildcard lets any branch, including the attacker’s, assume the role.

Make the GITHUB_TOKEN read-only by default

Set the organization’s default workflow permissions to read-only and grant contents: write, packages: write or id-token: write per job where it is needed. This limits what a legitimate workflow’s token can do, but it is a default, not a cap: an attacker who can edit a workflow can also edit its permissions: block, and the stolen user token is unaffected. It pays off together with the restrictions on workflow changes below.

Restrict who can create branches and change workflows

Rulesets can restrict branch creation to named patterns. A rule that blocks direct pushes to main stops the workflow-injection variant. On private and internal repositories, a push ruleset can block any push that changes .github/workflows/**. It blocks legitimate workflow changes too, so give a small team bypass permission and route workflow changes through them. Add CODEOWNERS for .github/ and turn on “Require review from Code Owners” in the branch ruleset: CODEOWNERS alone only requests the review, it does not require it.

Disable install scripts

npm config set ignore-scripts true on developer machines and in CI stops the postinstall variant. pnpm 10 and later block install scripts of dependencies by default, but not the scripts in your own project’s package.json, which is where this variant puts its hook. Set ignore-scripts=true for pnpm as well, and allow the few dependencies that need a build step explicitly.

Shorten what a stolen token is worth

The accounts were not phished one at a time. Their tokens leaked from somewhere, and Aikido found that the accounts overlap with the October GhostActions wave, whose developer-machine stealer took ~/.git-credentials, SSH keys and CLI credentials. Prefer fine-grained tokens scoped to the repositories they need, with an expiry. Enforce SSO and hardware-key 2FA in the organization, and review who still has write access. Every stale collaborator is one more token that can push.

Alert on the cleanup, outside the repository

Deleting a workflow run is rare in normal work and central to this attack. Stream the organization audit log to a system you control and alert on workflows.delete_workflow_run, on new deploy keys, and on new branch-protection bypasses. That alert states a fact (“a run was deleted”), so it needs no tuning, and it fires from outside the repository the attacker controls. Audit log streaming is configured on a GitHub Enterprise Cloud enterprise account; without one, a scheduled check for gaps in run numbers (the scanner’s run-gap check) is a partial fallback. It sees a deleted run only once a later run of the same workflow survives, and it cannot see a workflow whose runs were all deleted.

Limit where runners can send data

The stealer exfiltrates over plain HTTP to an IP address. An egress allowlist on self-hosted runners, or an egress-filtering step on hosted runners, turns a successful run into a failed one.

Run the scan again

A clean result today says nothing about the next wave. The scanner exits non-zero on a HIGH finding, so it can run on a schedule from a repository that holds no secrets beyond a read-only token. WARN findings such as run-number gaps, and checks that could not run, still exit zero, so read the report as well as the exit code.

Summary

The wfx campaign needed a stolen token, branch-wide secrets and the freedom to delete its own evidence. Environment-scoped secrets and exact OIDC trust conditions take away the payoff. Read-only default tokens and rulesets take away most of the reach. An audit-log alert on deleted workflow runs takes away the hiding. None of these needs new tooling.

Aarno Aukia

Aarno is Co-Founder of VSHN AG and provides technical enthusiasm as a Service as CTO.

Contact us

Our team of experts is available for you. In case of emergency also 24/7.

Contact us
General Security Tech

Katertag: eMudhra, PHP2Shell and GitLab – three critical fixes in one day

22. Oct 2026

Today feels like a Katertag. For our non-German-speaking friends: that’s the day after a long night, when your head is heavy, the coffee is strong and everyone moves a little slower. Except we didn’t spend last night celebrating. We spent it patching – three times. In the morning it was compromised certificates, in the afternoon PHP, and later that night GitLab.

Morning: compromised certificate authorities

Every time you see the lock icon in your browser, a certificate authority (CA) is vouching that the website really is who it claims to be. If an attacker gets hold of a CA’s keys, they can impersonate any website.

That’s what happened with eMudhra. According to Google, a security researcher reported that the private keys of eight eMudhra intermediate CA certificates had been generated with insufficient randomness – which made it possible for anyone to forge trusted HTTPS certificates for any website. Chrome blocked the affected CAs within hours of the report, and Google is removing the root certificate behind them from the Chrome Root Store on October 27th.

Browsers could fix this quickly. Everything else could not. As Cloudflare explains, lots of software checks certificates against its own trust store – in the operating system, in language runtimes, in container base images. All of those need updating, rebuilding and restarting. That’s exactly the kind of work that lands on a platform team, and on the morning of October 21st, the whole VSHN team was working on the CA fix.

Afternoon: PHP2Shell

Our engineers were already pretty busy when the next one arrived. On October 21st, the PHP developers released emergency security updates for two critical vulnerabilities in the PHP core interpreter, CVE-2026-109618 and CVE-2026-109619, both rated 9.2 and allowing an unauthenticated attacker to run code remotely on an affected web server. To make things worse, details leaked online on October 20th, before the coordinated disclosure and before patches were available. The flaws now go by the name “PHP2Shell”, and the advice from security authorities was blunt: patch immediately or consider taking exposed applications offline. The PHP Foundation has its own write-up on the release and what they’re doing to strengthen PHP security going forward.

This was not a theoretical risk. One hosting provider reported that attackers started sending requests to the WordPress sites they host from 08:44 UTC that morning, using a public proof-of-concept exploit.

What PHP is and what runs on it

PHP is a programming language made for the web. It runs on the server and builds pages on the fly – pulls content from a database, checks if you’re logged in, renders the HTML and sends it to your browser. It powers around 70% of all websites. Some of the best-known software built on it:

  • WordPress, including WooCommerce online shops
  • MediaWiki, the software behind Wikipedia
  • Drupal
  • Joomla
  • TYPO3
  • Magento and Shopware
  • Nextcloud

The bug sits in PHP itself, not in any of these applications or their plugins, so keeping WordPress, TYPO3 or Nextcloud updated didn’t protect you. Every PHP version released in the last decade is affected, going back to version 5.4.

How we and our customers reacted to PHP2Shell

Plenty of posts out there explain what broke in PHP. What we find more interesting is what happens on the ground when something like this hits – so here’s how yesterday looked for us.

Our team started monitoring on the evening of October 20th, as soon as the PHP project announced the upcoming release. The Kubernetes and OpenShift platforms we run for our customers don’t run on PHP themselves, but PHP shows up in plenty of places on and around them, which is why we treated this as a major incident across our managed services.

Shortly before lunchtime on October 21st, one customer called us and asked us to take their website offline until the fix was out.

Our own website vshn.ch went offline too, from 4 pm on October 21st to 4 am on October 22nd – 12 (!) hours of downtime. vshn.ch is hosted at cyon.ch, one of the biggest Swiss web hosters, and they proactively turned off all PHP websites they host to protect them until PHP was patched. That’s something you don’t see every day – an entire hosting provider pulling the plug on every PHP site at once as a precaution. But it’s something we all might see more often in the future, when the next deep-down bug in a shared foundation turns up and patching fast is the only real defense.

Once the fix was public, we updated everything else. On virtual machines running PHP, we updated as soon as Ubuntu and Red Hat shipped patched packages. The Docker images we maintain are being redeployed as patched base images become available. And where customers run their own PHP apps in containers on our clusters, those images also needed patching, so we asked those customers to rebuild on a patched PHP version and redeploy. All the details are on our status page.

mod_php vs. PHP-FPM: not every setup carried the same risk

All common ways of running PHP for web requests were affected: Apache with mod_php, PHP-FPM, php-cgi, FrankenPHP and LiteSpeed. But how you run PHP still mattered. According to the PHP developers, the risk was highest for setups using Apache with mod_php, where they demonstrated an exploit that triggers before any application code runs. In our setups, we use PHP-FPM. PHP-FPM was affected too, though, and patching was the only complete fix.

Night: GitLab

As if that day wasn’t already “spannend” enough: later that night, GitLab released fixes for a critical flaw – CVE-2026-110264, rated 10.0, the maximum – that lets an attacker run code on a self-managed GitLab server without logging in. It affects every version back to 7.0 from 2014, because the bug sits in the regular-expression engine GitLab has shipped all along. Our VSHNeers fixed that one too.

What we take away from it

Three very different problems, one common thread: none of them were in the applications people use every day. They were in the layers underneath – the certificates that make HTTPS trustworthy, the language that runs most of the web, the regex engine inside a developer platform. Every piece of software we run sits on layers of code that someone wrote years ago and most of us never look at. It’s easy to point fingers at eMudhra, PHP or GitLab now. Please don’t. Heartbleed hit OpenSSL in 2014, Log4Shell hit the Java world in 2021. This can happen to any foundation we all build on.

The AI angle

What makes PHP2Shell stand out is how it was found. The vulnerable code had been present for more than a decade, but exploiting it required an exceptionally complex chain of steps, at the edge of what human researchers could practically achieve. Frontier AI models substantially reduced that barrier. According to the researchers at Wiz, a single researcher completed in a week what previously would have taken a world-class team months of work.

That’s both scary and good news. Scary, because “too complicated to exploit” is no longer a safety net – attackers have the same tools. Good, because defenders can now find these deeply buried bugs faster too, and fix them before someone else uses them. We’re pretty sure days like yesterday won’t stay rare. Expect more of these, in more languages, more often. Which means one thing matters more than ever: how fast you can patch.

And this is where we want to say thank you. Our VSHNeers were quick to patch, and some of them could really use some sleep today. If one of them looks a bit tired in your next call, now you know why.

What you should do

For the certificates: if your website uses a certificate chaining to emSign ECC Root CA – G3, Google says to replace it with one from another CA right away, before the root is removed from Chrome on October 27th. Beyond browsers, update the trust stores in your operating systems, runtimes and container base images, then rebuild and restart. And if certificate errors show up after patching, don’t fix them by turning off certificate verification.

For PHP: update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35. If you’re on an older version, PHP 8.1 and older may not receive a fix – check with your vendor and plan the upgrade now. If your server is managed through a hosting panel like cPanel, the patched PHP versions come through the panel’s own updates – so update the panel, not just your application. If you run PHP in containers, rebuild your images on a patched base and redeploy. And remember that a patch does not remove an existing compromise, so have a look at your logs too.

For GitLab: if you run a self-managed instance, upgrade to the fixed version for your release branch.

If you’re not sure whether something in your stack is affected, talk to us. We’re a bit tired today, but we’re here.

Now, more coffee.

Markus Speth

Marketing, Communications, People

Contact us

Our team of experts is available for you. In case of emergency also 24/7.

Contact us