These write-ups are not threat intelligence and are not kept up to date as an incident develops. They are here to show how each attack worked, so you can find and fix the same techniques in your own setup. For the latest on an incident, read its sources.
GitHub's internal repositories taken through a VS Code extension
May 2026 · Contained
A token stolen through a poisoned TanStack package let the attacker publish a backdoored Nx Console extension, which ran on a GitHub employee's machine and led to about 3,800 of GitHub's internal repositories being copied.
- Went after
- Delete code or cover tracksSteal CI secrets and tokensPoison the build or published packageRead or expose private code
- Access held
- Scale
- About 3,800 GitHub-internal repositories
Full summary
It started a week earlier, with someone else's install. On 11 May 2026 an Nx contributor ran pnpm install and pulled one of the malicious TanStack versions, which took the GitHub CLI token off their machine. With that token the attacker pushed a workflow built to send out the organization's secrets, deleted workflow runs to hide it, and planted a payload in an orphan commit in nrwl/nx. On 18 May they published Nx Console 18.95.0, a backdoored release of a VS Code extension with more than 2.2 million installs and a verified publisher. It was on the Visual Studio Marketplace for about 18 minutes and on Open VSX for 36, and as soon as a workspace was opened it collected every credential it could find: GitHub tokens, npm, cloud, Vault and 1Password. One of the machines it ran on belonged to a GitHub employee. The attacker, the group known as TeamPCP, claimed about 3,800 of GitHub's internal repositories, which GitHub called directionally consistent with its own findings. GitHub found no impact on customer repositories, but rotated its secrets and the GitHub Enterprise Server signing key, so every GHES administrator had to install the new key before the next upgrade.
How it unfolded
Pick a step to zoom into it. A dashed line is a step the sources do not state. Blue dots are the checklist items that break the step.
Whole path
The whole attack, one row per step. Pick a step on the left, or click a box in its row.
On 11 May 2026 TeamPCP published 84 malicious versions of 42 @tanstack packages. At 20:43 UTC an Nx core contributor ran pnpm install in another project and got @tanstack/zod-adapter 1.166.15. The project's seven day minimum-release-age was ignored, because its pinned pnpm 10.14 was older than the setting. The prepare script ran a credential stealer that took the contributor's GitHub CLI OAuth token, and the token was used against the GitHub API 74 seconds later.
What breaks this step
- Third-party Actions pinned to a full commit SHA instead of a mutable tag or branch
- Restrict which Actions can run to GitHub-verified creators or an internal allow-list
- Review new dependencies in PRs and hold new package versions for a few days before they're allowed in (a cooldown).
- Disable install scripts where you can (npm ignore-scripts).
At 20:43:51 UTC the token pushed a commit to an Nx repository adding a workflow built to send out organization secrets, with the author email made to look like a trusted bot. Nx does not say whether it ran. GitHub's advisory says the attacker ran workflows on the Nx Console repository as a contributor.
What breaks this step
- CODEOWNERS in place, required on sensitive paths
- Rulesets applied: push restriction, tag protection, sensitive file-path protection
- Inventory every Actions secret and its visibility/scope; the results are usually surprising
- Cloud credentials migrated from static keys to OIDC federation, scoped to repo + branch
- Put production secrets in environments with required reviewers
- Set an organization-wide maximum PAT lifetime (90 days is a reasonable default)
- Disable classic PATs organization-wide, forcing migration to fine-grained PATs
- Secret scanning and push protection enabled
- Set `persist-credentials: false` on actions/checkout wherever later steps do not push
- Require organization owner approval for fine-grained PATs.
- Never upload the checkout workspace as an artifact.
CodeQL Analysis workflow runs were deleted in bulk across several repositories on 11 May, and one more on 15 May from a different HTTP client. The token was last used at 00:04 UTC on 16 May, about five days after it was stolen.
What breaks this step
At 03:18 UTC on 18 May an unsigned orphan commit, 558b09d7, was pushed to nrwl/nx under a former contributor's name. It belongs to no branch, so it can only be fetched by its hash, and it holds a small package that runs the stealer under Bun. Its message threatened a wiper if the commit was deleted within 24 hours.
At 12:30 UTC the attacker uploaded 18.95.0, with 2,777 bytes added to the minified main.js, to the Visual Studio Marketplace as the compromised contributor, and at 12:33 to Open VSX. StepSecurity says it was signed with the stolen VSCE_PAT publishing token. A maintainer saw the publish notice at 12:36 and removed it from the Marketplace at 12:47; Open VSX removed it at 13:09. The stores counted 28 and 41 downloads; Nx's own telemetry saw about 6,000 activations.
What breaks this step
- Adopt artifact attestations for build provenance on published binaries/images
- Cloud credentials migrated from static keys to OIDC federation, scoped to repo + branch
- Publish packages with trusted publishing (OIDC) instead of long-lived registry tokens
- Put production secrets in environments with required reviewers
- Write and rehearse a credential-rotation runbook before you need it
On opening a workspace the extension ran a hidden task that fetched the orphan commit with npx and started the stealer in the background. It collected GitHub tokens, npm, AWS, Vault and 1Password credentials, private keys and Claude configuration, and sent them out over HTTPS, the GitHub API and DNS. On macOS it installed a Python backdoor polling GitHub for signed commands. GitHub says it detected and contained the compromise of the employee's device on 18 May and isolated it.
What breaks this step
- Set an organization-wide maximum PAT lifetime (90 days is a reasonable default)
- Enforce an IP allow list for Git and web UI access from trusted ranges
- Allow-list IDE extensions centrally and block the rest.
- Hold new extension and tool versions for a few days before they install (a cooldown).
- Work on sensitive repositories in Codespaces or dev containers instead of on the laptop.
Sophos reports the repositories were cloned with credentials taken from the employee's machine; GitHub has not said which. TeamPCP claimed about 4,000 repositories and offered them for sale from 50,000 US dollars. GitHub said its own count of about 3,800 was directionally consistent with the claim, that only GitHub-internal repositories were taken, and that some hold excerpts of support conversations with customers.
What breaks this step
- Set an organization-wide maximum PAT lifetime (90 days is a reasonable default)
- Disable classic PATs organization-wide, forcing migration to fine-grained PATs
- Audit and revoke stale PATs, unused SSH keys, and inactive accounts
- Enforce an IP allow list for Git and web UI access from trusted ranges
- Service-account automation migrated from PATs to GitHub Apps
From 18 into 19 May GitHub rotated its critical secrets, highest impact first, and published the incident on 20 May. As a precaution it rotated the key that signs GitHub Enterprise Server releases, so every GHES administrator had to install the new GPG public key with a GitHub script before upgrades would verify. Enterprise Cloud customers had nothing to do. Nx revoked the contributor's credentials, put a second admin's approval on Nx Console releases and stopped allowing the gh CLI on developer machines.
Frameworks
Part of
Contained. First seen May 2026, last seen May 2026. About 3,800 GitHub-internal repositories (as of 26 May 2026, source). Mapping by ghtier, not yet reviewed. Threat landscape
Sources
- postmortemInvestigating unauthorized access to GitHub's internal repositories
- postmortemNx Console v18.95.0 postmortem
- advisoryGHSA-c9j4-9m59-847w: compromised Nx Console 18.95.0
- researchNx Console VS Code extension compromised (StepSecurity)
- researchMini Shai-Hulud strikes again: TanStack and more npm packages compromised (Wiz)
- researchGitHub breached through a VS Code extension
- researchGitHub internal repositories breached (Sophos)
- tracker5 supply chain attacks in 48 hours
Reported by: GitHub