# Actions cache poisoning (Angular, TanStack)

incident, `incident:cache-poisoning`. Page: https://ghtier.com/incidents/cache-poisoning

A fork's pull request ran in a pull_request_target workflow that shares the repository's Actions cache, wrote a poisoned pnpm store under the key the release workflow restores, and when the release ran, the malware took its OIDC token from memory and published 84 malicious TanStack versions.

**Abused:** [OIDC ID token: Write (repository)](https://ghtier.com/tier/permissions/id-token-write.md) (Tier 1)

**Used:** [Run PR code in a privileged workflow](https://ghtier.com/attack-paths/technique-pwn-request.md) (Tier 1), [Read secrets from the runner](https://ghtier.com/attack-paths/technique-runner-memory.md) (Tier 2), [Poison a shared Actions cache](https://ghtier.com/attack-paths/technique-cache-poison.md) (Tier 1), [Publish a malicious version with a stolen token](https://ghtier.com/attack-paths/technique-malicious-release.md) (Tier 1), [Hide the payload in a commit only its hash reaches](https://ghtier.com/attack-paths/technique-orphan-commit.md) (Tier 1), [Poison a cache the release build restores](https://ghtier.com/attack-paths/escalation-fork-pr-to-cache.md) (Tier 1)

**Sources:**
- [TanStack npm supply chain compromise postmortem](https://tanstack.com/blog/npm-supply-chain-compromise-postmortem)
- [Mini Shai-Hulud strikes again: TanStack and more npm packages compromised (Wiz)](https://www.wiz.io/blog/mini-shai-hulud-strikes-again-tanstack-more-npm-packages-compromised)
- [Cache poisoning through pull_request_target: the TanStack incident](https://safedep.io/tanstack-github-actions-cache-poisoning/)
- [The cache that bites back: GitHub Actions cache poisoning attacks](https://hivesecurity.gitlab.io/blog/github-actions-cache-poisoning-supply-chain/)

From ghtier (https://ghtier.com). Every entry and link: https://ghtier.com/data/graph.json. Tiers: https://ghtier.com/tier.
