<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/hardening-tanstack-after-the-npm-compromise-ak8jz2uao" -->

---
title: Hardening TanStack After the npm Compromise | daily.dev
description: TanStack maintainers detail the follow-up actions taken after a supply-chain attack compromised 42 Router/Start packages published to npm. The attack exploited...
canonical: https://daily.dev/posts/hardening-tanstack-after-the-npm-compromise-ak8jz2uao
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Hardening TanStack After the npm Compromise | daily.dev
og:description: TanStack maintainers detail the follow-up actions taken after a supply-chain attack compromised 42 Router/Start packages published to npm. The attack exploited...
og:url: https://daily.dev/posts/hardening-tanstack-after-the-npm-compromise-ak8jz2uao
og:image: https://api.daily.dev/og/posts/ak8jz2uAo.png
og:image:alt: Hardening TanStack After the npm Compromise
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Hardening TanStack After the npm Compromise

**[TanStack](https://daily.dev/sources/tanstack-blog)** · 9 min read · 0 upvotes · 0 comments

## Summary

TanStack maintainers detail the follow-up actions taken after a supply-chain attack compromised 42 Router/Start packages published to npm. The attack exploited a pull_request_target workflow that let a fork's code poison a shared CI cache, which was later used to exfiltrate a short-lived OIDC publish token during a legitimate release. Compromised versions were live for roughly 20-26 minutes before deprecation. OIDC, provenance, 2FA, and lockfiles all worked as designed but didn't prevent the attack because the underlying workflow shape (a known-bad pattern documented by GitHub's security team for three years) was the actual hole. The team is rebuilding CI workflow structure, considering blast-radius reductions, and debating whether to restrict external PRs to invitation-only while keeping the project fully open source.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://tanstack.com/blog/incident-followup>

## Questions this post answers

### How did attackers compromise TanStack npm packages without stealing a maintainer's publish token?

Attackers exploited a GitHub Actions pull_request_target workflow, a known-bad pattern that runs in the context of the base repository rather than the fork. A pull request from a renamed fork gained write access to a shared CI cache, poisoning it; when a later legitimate merge triggered the release workflow, the poisoned cache was restored and used to extract the short-lived OIDC publish token from the runner's memory at creation time.

_Teams auditing their own release pipelines for similar cache-poisoning risks can track CI security incidents like this on daily.dev._

### Which TanStack packages were affected by the May 2026 npm supply-chain compromise?

Only packages in the Router/Start monorepo were affected, 42 packages across two versions each; all were deprecated within an hour and removed by npm shortly after. Query, DB, Store, AI, Table, Form, HotKeys, Virtual, Pacer, Config, Devtools, CLI, and Intent were unaffected, and every currently published version of every TanStack package is safe to install.

_Anyone checking whether a dependency was hit by a specific supply-chain attack can follow incident scope updates via daily.dev._

### Does using OIDC-based publishing instead of long-lived npm tokens prevent supply-chain attacks?

No, OIDC-based publishing reduces one attack path but does not guarantee safety. It eliminates the risk of a stolen long-lived token sitting on a maintainer's machine and ties releases to specific workflows, branches, and repositories, which also gives clear audit trails during incident response. However, attackers can still steal a short-lived OIDC token at the moment of creation if the surrounding CI workflow has exploitable holes, such as a pull_request_target misconfiguration.

_Developers weighing OIDC versus token-based publishing for their own packages can compare real incident outcomes on daily.dev._

## Similar posts on daily.dev

- [TanStack Details Sophisticated npm Supply Chain Attack That Compromised 42 Packages](https://daily.dev/posts/tanstack-details-sophisticated-npm-supply-chain-attack-that-compromised-42-packages-bjod4ssnq) · InfoQ · 0 upvotes · 0 comments
- [\[Dev Weekly \#111\] TanStack npm supply-chain compromise](https://daily.dev/posts/dev-weekly-111-tanstack-npm-supply-chain-compromise-rsgcdrkve) · The Miners · 1 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#cicd](https://daily.dev/tags/cicd), [#github-actions](https://daily.dev/tags/github-actions), [#npm](https://daily.dev/tags/npm), [#tanstack](https://daily.dev/tags/tanstack)

[View this post on daily.dev](https://daily.dev/posts/hardening-tanstack-after-the-npm-compromise-ak8jz2uao)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Hardening TanStack After the npm Compromise","url":"https://daily.dev/posts/hardening-tanstack-after-the-npm-compromise-ak8jz2uao","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/hardening-tanstack-after-the-npm-compromise-ak8jz2uao"},"datePublished":"2026-08-23T12:23:58.527Z","dateModified":"2026-08-23T12:59:44.340Z","description":"TanStack maintainers detail the follow-up actions taken after a supply-chain attack compromised 42 Router/Start packages published to npm. The attack exploited...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f22852cee63f4c88cd47ebe0488891c0?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f22852cee63f4c88cd47ebe0488891c0?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"TanStack","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"TanStack","logo":"https://media.daily.dev/image/upload/s--TVIrvIT7--/f_auto,q_auto/v1787487634/logos/tanstack-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/tanstack-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/hardening-tanstack-after-the-npm-compromise-ak8jz2uao","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,cicd,github-actions,npm,tanstack","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"TanStack","item":"https://daily.dev/sources/tanstack-blog"},{"@type":"ListItem","position":3,"name":"Hardening TanStack After the npm Compromise"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/hardening-tanstack-after-the-npm-compromise-ak8jz2uao#faq","mainEntity":[{"@type":"Question","name":"How did attackers compromise TanStack npm packages without stealing a maintainer's publish token?","acceptedAnswer":{"@type":"Answer","text":"Attackers exploited a GitHub Actions pull_request_target workflow, a known-bad pattern that runs in the context of the base repository rather than the fork. A pull request from a renamed fork gained write access to a shared CI cache, poisoning it; when a later legitimate merge triggered the release workflow, the poisoned cache was restored and used to extract the short-lived OIDC publish token from the runner's memory at creation time. Teams auditing their own release pipelines for similar cache-poisoning risks can track CI security incidents like this on daily.dev."}},{"@type":"Question","name":"Which TanStack packages were affected by the May 2026 npm supply-chain compromise?","acceptedAnswer":{"@type":"Answer","text":"Only packages in the Router/Start monorepo were affected, 42 packages across two versions each; all were deprecated within an hour and removed by npm shortly after. Query, DB, Store, AI, Table, Form, HotKeys, Virtual, Pacer, Config, Devtools, CLI, and Intent were unaffected, and every currently published version of every TanStack package is safe to install. Anyone checking whether a dependency was hit by a specific supply-chain attack can follow incident scope updates via daily.dev."}},{"@type":"Question","name":"Does using OIDC-based publishing instead of long-lived npm tokens prevent supply-chain attacks?","acceptedAnswer":{"@type":"Answer","text":"No, OIDC-based publishing reduces one attack path but does not guarantee safety. It eliminates the risk of a stolen long-lived token sitting on a maintainer's machine and ties releases to specific workflows, branches, and repositories, which also gives clear audit trails during incident response. However, attackers can still steal a short-lived OIDC token at the moment of creation if the surrounding CI workflow has exploitable holes, such as a pull_request_target misconfiguration. Developers weighing OIDC versus token-based publishing for their own packages can compare real incident outcomes on daily.dev."}}]}
```

