tj-actions changed-files Compromise
March 2025 chained GitHub Actions compromise (CVE-2025-30066, with reviewdog CVE-2025-30154): every version tag of
tj-actions/changed-files, used by ~23,000 repos, was repointed to a commit that dumped runner memory secrets into workflow logs. It started as a targeted attack on Coinbase.
How it works
Attack chain, reconstructed by Unit 42 (each hop steals a PAT that unlocks the next):
| Date (UTC) | Step |
|---|---|
| 2024-11-28 | A SpotBugs maintainer puts their own PAT into a spotbugs/sonar-findbugs workflow to fix a CI problem |
| 2024-12-06 | Attacker (deleted user randolzfow) opens a fork PR against a pull_request_target workflow in sonar-findbugs and leaks the maintainer PAT. This is a classic pwn request |
| 2025-03-11 10:50 | With that PAT, the attacker invites throwaway user jurkaofavak to spotbugs/spotbugs, pushes a branch containing a malicious workflow, and dumps all repo secrets. Those include a reviewdog maintainer’s PAT stored there |
| 2025-03-11 18:42–20:31 | reviewdog/action-setup@v1 tag points to a malicious commit (CVE-2025-30154), then gets reverted. The commits came from fork iLrmKCu86tjwp8 |
| 2025-03-12/13 | Throwaway users fork coinbase/agentkit and experiment with its changelog.yml, which used tj-actions/changed-files@v39. A March 13 payload variant explicitly targets Coinbase |
| ~2025-03-14 | tj-actions/eslint-changed-files runs reviewdog/action-setup as a composite action. This leaks the tj-actions-bot PAT, and the attacker uses it to commit 0e58ed8 (spoofing renovate[bot] inside a real auto-merged Renovate PR) and then force-repoint every tag, v1.0.0 through v44.5.1, to it |
| 2025-03-14 | StepSecurity Harden-Runner flags anomalous egress (gist fetch). Fixed in v46.0.1, and both CVEs were added to CISA KEV on 2025-03-26 |
Stealth primitives the attacker relied on
- Fork-network shadow commits: a commit pushed to a fork is addressable as
owner/repo@<sha>in the parent. After the fork or user is deleted, it can’t be traced unless you know the SHA. - Tag pushes are not recorded in the GitHub org audit log, according to Unit 42. Repointing tags is near-invisible.
- Orphaned commits are reachable by SHA after their branch is deleted, so tags can point at code that isn’t on any branch.
- Commit impersonation: the commits were unsigned, and their author fields were set to
renovate[bot]orgithub-actions[bot].
Payload
- The
index.jsin the action got a Node function holding a base64 blob. When decoded, itcurls a Python script from a GitHub gist and runs it withsudo. - The script finds the
Runner.Workerprocess, walks/proc/<pid>/mapsand/proc/<pid>/mem, regex-matches{"value":"...","isSecret":true}, and prints the matches double-base64-encoded to the job log. No external exfiltration was seen for tj-actions. On public repos, the logs are public, so leaking the secrets there was enough. - The reviewdog variant embedded the payload directly in base64 and didn’t fetch it with
curl. A Flank variant POSTed the stolen data to a gist instead. - Typical loot: AWS keys, GitHub PATs, npm tokens, private RSA keys.
ghs_installation tokens expire at job end or within 24h, so the real risk was explicitly referencedsecrets.*.
Detection / response
# org-wide usage
https://github.com/search?q=org:<ORG>+uses:+tj-actions/&type=code
semgrep --config r/10Uz5qo/semgrep.tj-actions-compromised- In runs between 2025-03-12 00:00 and 2025-03-15 12:00 UTC, expand the “Get changed files” step. For reviewdog, look for
🐶 Preparing environment .... A double-base64 string there means the payload ran. Hunters released a tool that double-decodes log blobs and greps forisSecret. - Runtime signals: a
/procmemory-dump rule (Sysdig). The Falco rule fires whenbase64reads stdin piped fromcurl/wget. - Remove references on all branches, rotate any secret that was explicitly referenced, and download the logs before you delete runs.
Lessons / defenses
- Pin to full commit SHA. Hash-pinned consumers were unaffected unless they bumped to a malicious SHA during the window. See GitHub Actions Security.
- Use an org-level allowed-actions policy, put secrets behind Environments with required reviewers, require MFA for anyone who can push tags, and monitor egress (Harden-Runner).
- Don’t store long-lived PATs as repo secrets in repos that run
pull_request_target. The entire chain started from one maintainer PAT. - Transitive actions (composite
uses:inside an action you pinned) are not covered by your pin.
Related
- Software Supply Chain Security
- GitHub Actions Security
- Pwn Requests
- CI/CD Pipeline Attacks
- Shai-Hulud Worm
- Leaked Cloud Credentials
Sources
- Unit 42 — GitHub Actions Supply Chain Attack: Coinbase to tj-actions · original
- CISA — tj-actions/changed-files compromise (CVE-2025-30066) · original
- Wiz — tj-actions/changed-files supply chain attack · original
- Wiz — reviewdog/action-setup · original
- Snyk — Reconstructing the tj-actions compromise · original
- Sysdig — tj-actions Supply Chain Attack · original
- Semgrep — tj-actions/changed-files Compromised · original
- OpenSSF — Securing CI/CD After tj-actions and reviewdog · original
- Hunters — tj-actions and reviewdog · original