Skip to content
>_ITDITDWeb Security Platform

Security Guides

The attack came through legitimate channels — what developers should check after the TanStack, Nx Console and GitHub chain

In May 2026, a TanStack npm compromise led to a tampered Nx Console VS Code extension and the theft of GitHub internal repositories. Based on the three official postmortems: how to check if you were affected, which credentials to rotate, and which CI settings to review.

Published 2026-09-30 Updated 2026-09-30 Last verified 2026-09-30 17 min read

For: developers who install JavaScript dependencies with npm (including pnpm and yarn), anyone using extensions in VS Code or its forks, maintainers who publish packages from GitHub Actions, and GitHub Enterprise Server admins. This article is based on the postmortems and announcements published by TanStack, Nx and GitHub and does not cover attack techniques.

What developers should do today

1

Check lockfiles and CI logs for the affected TanStack versions

The affected packages are 42 Router/Start packages, 84 versions, including @tanstack/react-router, @tanstack/react-start, @tanstack/router-core and @tanstack/history (full list in GitHub advisory GHSA-g7cv-rxg3-hmpx). TanStack says Query, Table, Form, Virtual and its other packages were not affected. Check not only your lockfile's current contents but its change history around May 11, 2026. The malicious versions were removed from npm within hours, so an install during that window may not show in today's lockfile. In CI, look for jobs that ran an install after 19:20 UTC on May 11.

2

Check whether you had Nx Console v18.95.0

Nx's postmortem shows how to check the installed version with code --list-extensions --show-versions (the extension ID contains angular-console). Only v18.95.0 was affected, and it was available on May 18 between 12:30 and 13:09 UTC. Nx asks that anyone who had Nx Console with auto-update enabled during that window treat the machine as compromised, whichever install figure turns out to be right. The postmortem also lists files and processes to look for (indicators of compromise); if you are affected, work through that list.

3

If affected, rotate every credential reachable from that machine

TanStack and Nx list the same targets: GitHub tokens, npm tokens, SSH keys, cloud credentials (AWS, GCP, Azure), Kubernetes, Vault tokens, and the contents of any .env file. Nx adds credentials that tools on the machine could have minted during the window (temporary cloud credentials, GitHub CLI tokens and so on), and recommends considering a full rebuild of the machine after rotation. For revocation order and how to handle resident malware, see the "if you suspect infection" section of Defending against npm supply-chain worms.

4

If you maintain npm packages, check your publish history

According to TanStack, the code looked for other packages the victim maintains and tried to republish them with the same injection. If you publish to npm, check your packages' version history for versions you did not publish since May 11.

5

Find out where your GitHub token is stored on your machine

According to Nx, the stolen credential was a GitHub CLI token. In that environment it was stored in a file on disk and readable by any process running as the user, and it was used against the GitHub API within 74 seconds. Run gh auth status to see where yours is stored; if it sits in a plain file, consider moving it to the OS keychain or to a password-manager integration that injects the credential only at run time. After the incident, Nx's policy now disallows direct use of the GitHub CLI on developer machines. For narrowing token lifetime and scope, see Defending against npm supply-chain worms.

6

Verify that your release-age setting actually takes effect

According to Nx, the compromised contributor's project had minimum-release-age=10080 (7 days) in its .npmrc, but the project pinned pnpm 10.14, which does not support that setting and silently ignored it. Support starts with pnpm 10.16. The malicious version was only 77 minutes old at install time, so a working setting would have blocked it. Check the version pinned in the packageManager field of package.json, and have CI verify that it is new enough. The equivalent setting for npm is covered in Defending against npm supply-chain worms.

7

GitHub Enterprise Server admins: rotate the signing key

On May 26, GitHub announced that it is rotating keys, including the key that signs GitHub Enterprise Server update packages. Admins must rotate the GPG public keys in their instance; otherwise future upgrades fail with an error saying the file is not a valid GHES package. The instructions and the SHA256 digest of the helper script are in GitHub's post. GitHub also asks customers to download GHES updates only from the official source and to prepare to take security updates at an increased rate over the coming months. GitHub Enterprise Cloud customers need to take no action.

What package publishers should review in CI

Both TanStack's and Nx's postmortems say specifically which settings let the chain through. Below, those findings are translated into settings and policies you can check in your own repositories.

1

Do not run fork code under pull_request_target

According to TanStack, a bundle-size workflow ran on pull_request_target and, inside it, checked out and built code from a fork's pull request. pull_request_target runs with the base repository's privileges, and TanStack notes that the approval gate for first-time contributors does not apply to this trigger. Keep it to tasks that never run outside code, such as labeling and commenting. After the incident, TanStack removed every use of pull_request_target from its CI.

2

Do not share caches between untrusted jobs and release jobs

According to TanStack, the GitHub Actions cache is shared per repository: pull_request_target runs and pushes to main use the same scope. Cache saves are also not blocked by setting the workflow's permissions: to read-only. As a result, the release workflow restored a cache written by a job that had run outside code. After the incident, TanStack disabled the package cache in its release pipeline and purged all caches. Not restoring caches in workflows that publish is the simplest line to draw.

3

Grant publish rights (id-token: write) only to the publish job, behind an approval

TanStack's release workflow held id-token: write for npm trusted publishing (OIDC). According to the postmortem, the malicious publish did not come from the workflow's defined publish step; code running in another stage of the same run extracted a token and published directly. TanStack's own lesson is that a trusted-publisher binding has no per-publish review. Split publishing into its own job, separate from build and test, give only that job the permission, and put it behind a GitHub environment with required reviewers. After the incident, Nx made approval by someone other than the person who triggered the run mandatory for publishing.

4

Pin third-party actions to a commit SHA

After the incident, both TanStack and Nx pinned every action reference to a commit SHA instead of a tag or branch. TanStack describes floating references as "standing supply-chain risk independent of this incident".

5

Route publish notifications and audit logs to someone who reads them

Nx caught the tampered release through the routine notification email the extension marketplace sends on every upload. A maintainer who was not expecting a release recognized it as anomalous and unpublished within about 11 minutes. The second distribution channel had no such notification, and removal there took about 36 minutes. Meanwhile, activity with the stolen token, such as deleting workflow runs, sat in the audit log for a week unnoticed. Check that publish notifications reach someone on the team and that someone watches the audit log for deleted workflow runs.

What happened (from the three organizations' disclosures)

Everything below is as stated in TanStack's postmortem, Nx's postmortem and GitHub's announcement. Times are UTC.

  1. May 11, 2026, 19:20–19:26

    Through the release workflow of TanStack's Router/Start repository, 84 malicious versions across 42 packages are published to npm.
  2. May 11, 19:46

    An outside researcher files a detailed report in TanStack's repository. TanStack begins its response.
  3. May 11, 20:43

    An Nx contributor runs pnpm install in a project unrelated to Nx and resolves the malicious @tanstack/zod-adapter@1.166.15. According to Nx, the GitHub CLI token was stolen and used within 74 seconds.
  4. May 11, by 21:03

    TanStack has deprecated all 84 versions.
  5. May 11, 22:13–23:55

    npm removes the affected tarballs from the registry.
  6. May 15

    TanStack issues an all-clear: every currently published version is safe.
  7. May 18, 12:30–13:09

    Using the stolen contributor's access, Nx Console v18.95.0 is published to two extension distribution channels and then pulled.
  8. May 18 (Monday, US time)

    GitHub detects and contains a compromise of an employee device involving a poisoned VS Code extension, removes the malicious extension version and isolates the endpoint. Critical secrets are rotated that day and into the next.
  9. May 20

    GitHub goes public: its assessment is that only GitHub-internal repositories were exfiltrated.
  10. May 21

    Nx publishes its postmortem.
  11. May 26

    GitHub updates its post: it is rotating keys, including the GitHub Enterprise Server signing key, and lists admin actions.
84 versions
Malicious TanStack versions (42 packages × 2)
~39 min
Window in which Nx Console v18.95.0 was available (both channels combined)
7 days
How long, per Nx, the stolen token was active in Nx's repositories
No action
Required of GitHub Enterprise Cloud customers (per GitHub)
What the three organizations disclosed
TanStack: scope
42 packages, 84 versions from the Router/Start repository. Query, DB, Store, Table, Form, Virtual and other repositories unaffected. TanStack says it has no evidence that npm tokens were stolen
TanStack: what the code did
Ran as an install-time script, collected cloud, Kubernetes, Vault, npm, GitHub and SSH credentials and sent them out, and tried to spread to other packages the victim maintains
TanStack: root cause
The combination of (1) building fork code under pull_request_target, (2) that job being able to write a cache the release workflow restores, and (3) the release workflow being able to mint a publish-capable OIDC token
Nx: scope
Nx Console v18.95.0 only (v18.100.0 and later are safe). Nx CLI, official @nx/* plugins and Nx Cloud unaffected. The official marketplace counted 28 installs; the second channel, 41 downloads. Nx's own analytics show about 6,000 activations, and the gap is still being reconciled
Nx: root cause
(1) The upstream TanStack compromise, (2) a release-age setting silently ignored by an old pnpm, (3) a GitHub CLI token readable on disk, (4) a pipeline that let a single contributor publish the extension
GitHub: scope
Assessment: exfiltration of GitHub-internal repositories only. No evidence of impact to customer information stored outside them, such as customers' own enterprises, organizations and repositories. Some internal repositories do contain customer information such as excerpts of support interactions
GitHub: response
Removed the malicious extension version and isolated the endpoint. Rotated critical secrets, highest-impact first. Rotated keys including the GitHub Enterprise Server signing key and asked admins to rotate the public key. Says it will publish a fuller report once the investigation is complete

Reading note: the 'number of repositories taken from GitHub' is not GitHub's own figure

GitHub's post mentions a number of exfiltrated repositories, but it presents that figure as the attacker's claim, saying only that it is "directionally consistent" with its investigation so far. This site does not treat attacker claims as fact, so the figure is not repeated here. Likewise, Nx says its install figures disagree across sources and are still being reconciled. Rather than any number, decide based on whether you had the affected version during the window.

Where the chain could have been cut

1. TanStack CI

Outside PR code writes to a cache shared with release

↓

Cut here

No pull_request_target / no cache restore in publish workflows / approval to publish

2. 84 malicious npm versions

Published via the legitimate path, so they looked real

↓

Cut here

A release-age delay — on a tool version that honors it

3. Nx contributor's machine

GitHub CLI token read from a file on disk

↓

Cut here

No plaintext token files / watch audit-log deletions

4. Nx Console v18.95.0

One person's access publishes the extension

↓

Cut here

Require approval from someone other than the trigger

5. GitHub employee device

Poisoned extension, then internal repositories exfiltrated

↓

Cut here

Treat extension updates as dependencies (next section)

The chain as reconstructed from the three disclosures. The right column shows the setting or policy that could have cut the chain at each step (including measures the organizations adopted afterwards).

What did not prove safety this time

  • Legitimate publishing path and provenance: TanStack's malicious versions came out of a valid OIDC binding
  • A real contributor account: Nx Console was published with a genuine contributor's access
  • The distribution channel's automated checks: per Nx, the tampered version passed the official marketplace's automated verification
  • Settings that exist only on paper: the release-age setting was silently ignored by an old pnpm

What could have cut the chain (per the postmortems)

  • A second person's approval before publishing: Nx already had it on other repositories, but not on Nx Console
  • Separating publish workflows from caches: TanStack disabled the cache afterwards
  • A release-age delay that actually runs: the malicious version was 77 minutes old at install
  • A human reading the routine publish notification: it was Nx's only detection

This site's view: extension auto-update is automatic dependency intake

For npm dependencies, "don't install anything published in the last few days" is becoming common practice. Editor extensions, though, usually auto-update by default, and the same thinking has not caught up. That is why Nx wrote that anyone with auto-update enabled should assume compromise. And an extension runs on the machine that holds your GitHub and cloud credentials, with your privileges. On machines that hold production or package-publishing rights, consider turning off automatic updates with VS Code's extensions.autoUpdate setting and applying updates yourself after a few days. The cost is slower security fixes, but a version that was pulled within minutes of release, as here, is avoided by the delay alone.

One more point: this chain crossed organizational boundaries. The Nx contributor installed the malicious package in a project unrelated to Nx, and the GitHub employee installed Nx's extension. Your development machine is part of the supply chain of every project you ship code to, not just your employer's.

Sources (public record)

The facts in this article come from the public sources below. We do not cover attack techniques or information identifying the attackers.

  • TanStack, "Postmortem: TanStack npm supply-chain compromise" (published May 11, 2026; updated May 15) — tanstack.com
  • TanStack, "Hardening TanStack After the npm Compromise" (post-incident changes) — tanstack.com
  • GitHub Advisory Database, "GHSA-g7cv-rxg3-hmpx (CVE-2026-45321)" (full list of affected versions) — github.com
  • Nx, "Postmortem: Nx Console v18.95.0 supply-chain compromise" (May 21, 2026) — nx.dev
  • Nx Console security advisory "GHSA-c9j4-9m59-847w" — github.com
  • GitHub, "Investigation update: GitHub Enterprise Server signing key rotation" (published May 20, 2026; updated May 26) — github.blog
  • GitHub Security Lab, "Keeping your GitHub Actions and workflows secure: Preventing pwn requests" (safe use of pull_request_target) — securitylab.github.com
  • GitHub Docs, "Managing environments for deployment" (required reviewers) — docs.github.com

Update history

2026-09-30: First version, based on TanStack's postmortem (May 15 revision), Nx's postmortem (May 21) and GitHub's announcement (May 26 update). GitHub says it will publish a fuller report once its investigation is complete; we will update this page when it does.

FAQ

QWhich TanStack packages were compromised?
A

According to TanStack's postmortem, 42 packages published from the Router/Start repository were affected, two versions each, 84 versions in total (for example @tanstack/react-router 1.169.5 and 1.169.8, @tanstack/history 1.161.9 and 1.161.12). The full list is in GitHub security advisory GHSA-g7cv-rxg3-hmpx (CVE-2026-45321). Packages from other repositories such as Query, Table, Form and Virtual were not affected, and TanStack says every currently published version is safe to install.

QWhat should I do if I installed an affected version?
A

TanStack strongly recommends that anyone who installed an affected version on May 11, 2026 (UTC) rotate the AWS, GCP, Kubernetes, Vault, GitHub, npm and SSH credentials reachable from the install host. Because the code ran during installation, CI runners count as well as developer machines.

QI use Nx Console. Am I affected?
A

According to Nx's postmortem, only Nx Console v18.95.0 was affected, and it was available on May 18, 2026 between 12:30 and 13:09 UTC. v18.100.0 and later are safe. Nx asks anyone who had Nx Console installed with auto-update enabled during that window to treat the machine as compromised and rotate every credential. The Nx CLI (the nx package), the official @nx/* plugins and Nx Cloud were not affected.

QWere GitHub users' repositories leaked?
A

According to GitHub, the activity involved exfiltration of GitHub-internal repositories only, and it has no evidence of impact to customer information stored outside those repositories, such as customers' own enterprises, organizations and repositories. Some internal repositories do contain customer information, for example excerpts of support interactions, and GitHub says it will notify customers through established channels if any impact is found. GitHub Enterprise Cloud customers need to take no action.

QWhat do GitHub Enterprise Server admins need to do?
A

In its May 26 update, GitHub said it is rotating keys, including the key used to sign GitHub Enterprise Server update packages, and asked admins to rotate the GPG public keys in their instances. Without the rotation, future upgrades will fail verification. The instructions and the SHA256 digest of the helper script are in GitHub's post. GitHub also asks customers to download GHES updates only from the official source.

QAre the three incidents connected?
A

The TanStack–Nx link is stated in Nx's postmortem: on May 11 an Nx contributor ran pnpm install in an unrelated project, resolved the compromised @tanstack/zod-adapter 1.166.15, and had a GitHub CLI token stolen. GitHub's post links the 'poisoned VS Code extension' that compromised its employee device to the Nx Console security advisory.

QWhat was the root cause?
A

TanStack's postmortem names three weaknesses that only worked together: a pull_request_target workflow built code from fork pull requests; that job could write to a GitHub Actions cache shared with the release workflow; and the release workflow could mint the OIDC token used to publish to npm. Nx names a release-age setting silently ignored by an old pnpm version, a token stored where any local process could read it, and a pipeline that let one person publish the extension.