Skip to main content
Threat IntelligenceMay 23, 202613 min read

The TanStack Supply Chain Cascade: How One npm Compromise Reached GitHub, Grafana, and Beyond

The TanStack Supply Chain Cascade: How One npm Compromise Reached GitHub, Grafana, and Beyond

Threat Intelligence Bulletin

Week of May 18, 2026. Covering: TanStack npm compromise and its cascade into GitHub, Grafana, Nx, OpenAI, and Mistral AI; the Megalodon GitHub Actions worm; Microsoft Exchange and Cisco SD-WAN zero days under active exploitation.

The third week of May 2026 will be remembered as the week the software supply chain stopped being a hypothetical risk and started being a corporate incident category. A single npm compromise of TanStack packages cascaded into confirmed breaches at GitHub, Grafana, and Nx, with collateral exposure at OpenAI and Mistral AI. In parallel, the Megalodon worm pushed 5,718 malicious commits into 5,561 GitHub repositories in a six hour window, hijacking GitHub Actions workflows to exfiltrate secrets at industrial scale. Two zero days in Microsoft Exchange and Cisco SD-WAN added to the pressure. For security leaders, the pattern is unambiguous: the CI/CD pipeline is now the highest leverage attack surface in the enterprise, and most mid-market programs are not yet instrumented for it.

The Compromise Chain in Plain Terms

The cascade started, as far as public reporting has reconstructed, with a compromise of TanStack npm packages. TanStack is a portfolio of widely used JavaScript libraries, and its npm distribution carried an info stealer payload that executed inside CI/CD pipelines and developer environments that installed the affected versions. The stealer exfiltrated credentials and tokens spanning npm, AWS, Kubernetes, GitHub, GCP, and Docker.

One of the credentials it captured belonged to a maintainer of Nx, the popular monorepo toolset. The attackers, claiming the name TeamPCP, used those credentials to push a malicious orphan commit to the official nrwl/nx repository and to publish version 18.95.0 of the Nx Console VS Code extension to the Visual Studio Marketplace at 12:30 UTC on May 18. The poisoned extension was live for roughly 18 minutes before being pulled, but that was long enough. One of the developers who installed it during that window worked at GitHub.

From the GitHub employee's compromised machine, the attacker pivoted into GitHub's internal environment and accessed 3,800 internal repositories. GitHub's CISO disclosed the incident on May 19 and named the malicious Nx Console extension as the root cause. Grafana, meanwhile, disclosed on May 16 that its own codebase had been downloaded by an unauthorized party. The Grafana breach was eventually traced to the same TanStack compromise: a workflow token slipped through rotation after the TanStack event, and the attackers used it to access the GitHub environment. OpenAI and Mistral AI were also impacted by the underlying TanStack compromise according to public reporting.

One npm package. Three confirmed enterprise breaches at companies with mature security programs. Two more reportedly impacted. This is a chain reaction that defenders are not used to thinking about, because the entry point was upstream of the perimeter they normally monitor.

Megalodon: 5,718 Malicious Commits in Six Hours

On May 18, the same day Nx Console was poisoned, a separate automated campaign tracked as Megalodon began saturating GitHub with malicious commits. Over a six hour window, the campaign pushed 5,718 commits across 5,561 repositories, using throwaway accounts with randomized eight character usernames and author identities forged to mimic routine DevOps bots: build-bot, auto-ci, ci-bot, pipeline-bot.

Every commit dropped a GitHub Actions workflow file containing a base64 encoded bash payload. The payload exfiltrated whatever the runner had access to: CI secrets, cloud credentials, SSH keys, OIDC federation tokens, and source code secrets, all sent to a command and control server. Researchers identified two variants. A mass variant, observed as a workflow named SysDiag, added a new file triggered on every push and pull request, maximizing automated execution. A targeted variant, observed as Optimize-Build, replaced existing workflows with workflow_dispatch triggers to create dormant backdoors the attacker could fire later through the GitHub API. At least one legitimate npm package, @tiledesk/tiledesk-server in versions 2.18.6 through 2.18.12, propagated the targeted variant downstream through routine publishes by an unsuspecting maintainer.

Megalodon is consequential not because of any single victim, but because of what it demonstrates. The economics of GitHub Actions abuse now favor the attacker. Repositories are easy to fork, workflows execute automatically with broad credential access, and most organizations do not monitor their Actions runs the way they monitor production systems. An attacker with a bot farm and a payload can compromise thousands of CI environments in a single afternoon. Earlier this year we wrote about how supply chain compromise is becoming an operational tactic. Our analysis of the WordPress plugin supply chain backdoor campaign and the Axios npm supply chain compromise traced the early signs of that shift. Megalodon is the industrial version.

Is your CI/CD pipeline in your security program's scope?

Z Cyber's vCISO advisory treats the developer environment and CI/CD layer as production, aligned to NIST CSF supply chain risk management.

Talk to an Advisor →

GitHub Itself: 3,800 Internal Repos via a VS Code Extension

The GitHub breach is the most strategically interesting incident in the cascade because it inverted the conventional model of supply chain risk. Normally, security teams worry about what their organization installs from upstream maintainers. In this case, an upstream maintainer's environment was compromised, the attacker republished a trusted extension, and a downstream developer at one of the largest software companies in the world installed the malicious version during an 18 minute window. The blast radius reached 3,800 internal repositories.

The mechanism deserves attention. VS Code and IDE extensions are not a category that most security programs have inventoried, governed, or even discussed at the board level. They are installed at developer discretion, they request broad workspace and process permissions, and they receive automatic updates from marketplaces whose own access controls are still maturing. The Nx Console extension is in the same general risk category as a chrome extension or an unmanaged SaaS connector: trusted by default, monitored by no one.

The compensating control is not "ban extensions." That is operationally infeasible. The compensating control is to bring the developer environment into the same governance regime as production: a maintained inventory of approved extensions, an explicit policy for installing new ones, monitoring for unexpected outbound connections from developer machines, and credential management that assumes any single workstation can be compromised at any time. Most mid-market organizations do not have any of these in place. For organizations operating under SOC 2 or ISO 27001, the gap is now a material control deficiency, not a hygiene improvement.

Grafana: One Token That Slipped Rotation

The Grafana breach is the operational lesson buried in the week's news. Grafana's security team was aware of the TanStack supply chain event. They rotated credentials in response. They missed one workflow token. The unauthorized party used that single missed token to access Grafana's GitHub environment and download portions of its codebase. CoinbaseCartel, the group claiming the incident, attempted extortion. Grafana refused to pay, citing FBI guidance, and confirmed no customer data was accessed.

The takeaway is not that Grafana made a mistake. The takeaway is that credential rotation in a modern CI/CD environment is harder than it looks, and partial rotation is functionally equivalent to no rotation. GitHub workflow tokens, cloud OIDC federations, npm publish tokens, Docker registry credentials, package signing keys, and CI runner secrets all need to be enumerated and rotated together. A spreadsheet of where tokens live is the minimum control. An automated rotation system that proves a clean cut, with explicit verification that no old token remains valid, is the mature control.

Compounding the issue at Grafana was a misconfigured GitHub Action, a so called Pwn Request pattern, that let an attacker fork the repository, inject malicious code through a curl command, and extract a privileged token. This is a documented anti pattern in GitHub Actions design, and detecting it is not difficult, but it requires that someone with a security mandate review workflow files the way they review production code. Most engineering organizations have not formalized that review.

What This Means for NIST CSF, SOC 2, and AI Governance Programs

For organizations aligned to NIST CSF 2.0, the supply chain cascade reinforces the prominence of the GOVERN function. NIST CSF 2.0 elevated Supply Chain Risk Management to a core component of GOVERN precisely because incidents like the TanStack cascade depend on policy and accountability decisions that engineering teams alone cannot make. The relevant subcategories are explicit: organizations must establish, communicate, and monitor cybersecurity supply chain risk management requirements, including for software dependencies. Our NIST CSF 2.0 compliance checklist walks through these subcategories. Organizations whose GOVERN function lacks documented policies for npm, GitHub Actions, and IDE extension governance have a known gap, not an unknown one.

For SOC 2 environments, the cascade implicates the Change Management, Logical Access, and Risk Assessment criteria. A workflow token that should have been rotated and was not is a logical access control failure. A GitHub Action misconfiguration that allowed privileged token extraction is a change management failure. A risk assessment that did not enumerate IDE extensions as a category of third party software is a risk assessment failure. SOC 2 auditors are not yet pressing hard on supply chain pipeline controls, but that posture will change quickly as these incidents inform the next cycle of audit guidance. Our SOC 2 compliance guide covers how to align controls now rather than retroactively after an audit finding.

For organizations building or deploying AI systems, the cascade is also an AI governance event. OpenAI and Mistral AI were both reportedly impacted by the underlying TanStack compromise. AI labs depend on the same npm, GitHub Actions, and IDE extension ecosystem that every other software company depends on. The NIST AI Risk Management Framework treats software supply chain as part of the AI system context, and an attacker who can poison the dependency chain that builds a model can also poison the model itself. The boundary between traditional supply chain risk and AI specific risk is thinner than most governance frameworks have caught up to. We covered this category at length in AI supply chain risk and third party model governance.

Bring the developer environment into your security program.

Z Cyber's practitioner team builds supply chain risk programs that cover npm, GitHub Actions, IDE extensions, and CI/CD credential governance.

Get a Program Review →

Two Zero Days Also Under Active Exploitation

The supply chain story is dominant this week, but two zero day disclosures in widely deployed infrastructure also warrant attention from security leaders. On May 14, Microsoft confirmed active exploitation of CVE-2026-42897, a spoofing and cross site scripting vulnerability in Exchange Server affecting the Subscription Edition along with 2016 and 2019 builds. The vulnerability carries a CVSS rating of 8.1 and can be triggered by sending a specifically crafted email that, when opened in Outlook Web Access under certain interaction conditions, allows arbitrary JavaScript to execute in the browser context. Exchange remains heavily deployed in mid-market environments, and organizations still running on premises Exchange should treat this as a prioritized item in their vulnerability management cadence.

The same day, Cisco disclosed CVE-2026-20182, a critical authentication bypass in Cisco Catalyst SD-WAN Controller and Manager. The vulnerability carries a CVSSv3 score of 10.0 and is being exploited in the wild by a threat actor tracked as UAT-8616. A successful exploit allows an attacker to log in as an internal high privileged non root user, gain access to NETCONF, and manipulate the SD-WAN fabric's network configuration. This is the sixth SD-WAN zero day Cisco has patched in 2026, a pattern that itself is a strategic indicator: network management planes are an attractive target, and organizations relying on SD-WAN should ensure they have a clear inventory of which versions are in production and a tested patch path.

Takeaways for Security Leaders

Three points stand out from the week's events for security leaders running mid-market programs.

The CI/CD pipeline is production now. Megalodon and the TanStack cascade both succeeded because GitHub Actions workflows, npm installs, and IDE extensions ran with privileged credentials in environments outside the perimeter security teams typically monitor. Bringing the pipeline into program scope is no longer a nice to have. It is the highest leverage step a security program can take in 2026.

Credential rotation has to be complete or it is not rotation. Grafana caught the TanStack event, responded, and still lost a workflow token. The organizations that will avoid the next event are not the ones with the fastest detection, they are the ones with the most thorough rotation. That requires an authoritative credential inventory, an automated rotation system, and verification that no old credential remains valid after the cut.

Supply chain risk belongs in board reporting. The financial and reputational exposure of a GitHub style incident, or a Grafana style codebase exfiltration, is large enough that boards need to see it on the dashboard, not learn about it after the fact. NIST CSF 2.0 places supply chain risk in GOVERN for that reason. Organizations whose board materials currently cover phishing rates and patch compliance but not supply chain posture have a reporting gap, and the regulators following these incidents will close it for them if they do not close it themselves. For a deeper look at how board reporting is evolving, see our guide on what a vCISO actually does and our overview of executive and board risk advisory.

The cascade of May 2026 is not a one off. The next one is being prepared right now, somewhere upstream of a thousand mid-market CI pipelines, and the only organizations that will avoid being on the next casualty list are the ones that have brought the pipeline, the developer environment, and the third party software inventory into the same governance scope as everything else.

Related Resources

Frequently Asked Questions

What was the TanStack npm supply chain attack?

TanStack is a widely used set of open source JavaScript libraries published as npm packages. In May 2026, attackers compromised the TanStack npm distribution channel and shipped versions that contained an info-stealer payload. When downstream maintainers and CI/CD pipelines installed the malicious versions, the payload exfiltrated GitHub credentials, npm tokens, AWS keys, Kubernetes secrets, and GCP and Docker credentials. The TanStack incident itself was the entry point, but the more consequential story is what those stolen credentials were then used to do. The attackers, tracked publicly as TeamPCP, used credentials harvested from one developer to push a malicious version of the Nx Console VS Code extension, which in turn compromised a GitHub employee device and led to access to 3,800 internal GitHub repositories. Grafana, OpenAI, and Mistral AI were also impacted by the TanStack compromise.

What is the Megalodon GitHub Actions attack?

On May 18, 2026, an automated campaign codenamed Megalodon pushed 5,718 malicious commits to 5,561 GitHub repositories in a six hour window. The attacker used throwaway GitHub accounts with randomized eight character usernames and forged author identities to mimic routine DevOps bots like build-bot, auto-ci, ci-bot, and pipeline-bot. Each commit injected a GitHub Actions workflow file containing base64 encoded bash that exfiltrated CI secrets, cloud credentials, SSH keys, OIDC tokens, and source code secrets to a command and control server. A mass variant added a new workflow on every push and pull request to maximize automated execution, and a targeted variant replaced existing workflows with workflow_dispatch triggers to create dormant backdoors the attacker could fire on demand. Megalodon is significant because it weaponized GitHub Actions, the layer that most security programs do not monitor.

How did the Grafana GitHub breach happen?

Grafana Labs disclosed on May 16, 2026 that an unauthorized party obtained a GitHub workflow token and used it to download portions of its codebase. The root cause was a single token that slipped through credential rotation after the TanStack npm supply chain compromise. When the malicious TanStack package executed inside a Grafana CI/CD workflow, an info stealer exfiltrated workflow tokens. A separate misconfiguration in a freshly enabled GitHub Action, a so called Pwn Request pattern, allowed the attacker to inject code via a forked repository and extract additional privileged tokens. The attackers, who identified themselves as CoinbaseCartel, attempted extortion. Grafana refused to pay, citing FBI guidance, and reported no customer data or operational impact. The lesson is operational: token rotation after a known supply chain event must be complete and verified, not partial.

Why are software supply chain attacks accelerating in 2026?

Three structural factors are driving the acceleration. First, modern application stacks depend on hundreds of transitive packages, plugins, and extensions whose maintainers are individuals or small teams with limited operational security. Attackers have realized that compromising one upstream package can yield access to thousands of downstream environments. Second, CI/CD pipelines automatically install and execute these dependencies with privileged credentials in environments that most security teams do not monitor at the same depth as production. The blast radius of a compromised dependency is now larger than the blast radius of a compromised endpoint. Third, attackers have automated the discovery and exploitation of weak links across the open source ecosystem. The Megalodon campaign, which pushed thousands of malicious commits in hours, is a clear indication that supply chain attacks have moved from artisanal to industrial scale.

What should security leaders do after the May 2026 supply chain events?

Treat the developer environment and the CI/CD pipeline as production. That means inventorying every npm dependency, every VS Code and IDE extension installed on developer machines, every GitHub Action used in workflows, and every credential that any of those components can read. It means rotating workflow tokens on a defined cadence and treating any disclosed upstream supply chain event as a trigger for full rotation, not partial. It means monitoring GitHub Actions runs for anomalous outbound network connections and unexpected workflow file changes. And it means making supply chain risk an explicit line item in board reporting, because the financial and reputational exposure of a Grafana or GitHub style event is now too large to leave at the engineering team's discretion. The NIST CSF 2.0 GOVERN and IDENTIFY functions both name supply chain risk management as a core component for exactly these reasons.

Subscribe for Updates

Get cybersecurity insights delivered to your inbox.