tj-actions/changed-files: repointed tags shipped a memory scraper into public CI logs
Between Mar 12 and Mar 15, 2025 an attacker used a compromised maintainer PAT to point tags v1 through v45.0.7 of tj-actions/changed-files at malicious commit 0e58ed8671d6b60d0890c21b07f8835ace038e67. Across more than 23,000 repositories using mutable tags, the payload fetched a Python memory scraper from a GitHub Gist and printed Runner.Worker secrets directly into public build logs.
How they got in
Using a stolen Personal Access Token tied to an automation account, the attacker introduced malicious commit 0e58ed8671d6b60d0890c21b07f8835ace038e67 on Mar 12 and retroactively force-updated nearly every semantic version tag from v1 through v45.0.7 on Mar 14. Consumer workflows referencing @v44 or @v45 automatically ran the tampered code with zero changes in their own repositories.
Compromised PAT moves mutable tags across 23,000+ dependent repositories to the malicious commit.
AttackerMaintainer bot PATTampered actionObfuscated Node.js action downloads memdump.py from gist.githubusercontent.com and pipes it to sudo python3.
GitHub Gist payloadTampered actionmemdump.pyPython payload scans Runner.Worker memory for cloud keys, npm tokens and GitHub PATs.
memdump.pyRunner.Worker memEncoded secrets print directly to public build logs, evading GitHub masking until v46.0.1 cleanup.
Runner.Worker memPublic build logs
Figure 1. How the attack unfolded, and what stayed isolated. Select any step or box for details.
What they took
An obfuscated Node.js payload ran curl against an external GitHub Gist hosting memdump.py and piped it into sudo python3. On Linux GitHub-hosted runners, passwordless sudo let the script inspect /proc/<pid>/mem of the Runner.Worker process, extract AWS and GCP keys, GitHub PATs and npm tokens, double-base64 encode them to dodge GitHub’s log masker, and print them straight to stdout.
For public repositories, those build logs were globally readable without needing any outbound command-and-control server.
What stayed safe
Repositories pinned to immutable 40-character commit SHAs ignored the force-moved version tags entirely. Workflows enforcing outbound egress allowlists with StepSecurity Harden-Runner blocked the download from gist.githubusercontent.com, and generated the telemetry that exposed the supply-chain attack.
How to defend against this
Pin 40-char SHA
Referencing actions by full commit SHA prevents retroactive tag overwrites from ever entering your runner.
Egress allowlist
StepSecurity Harden-Runner in block mode denies unexpected runner connections to gist.githubusercontent.com.
ci-hardened.ymlPin every third-party GitHub Action to an immutable 40-character commit SHA and enforce outbound egress allowlisting with Harden-Runner. Stops steps 1 and 2.
jobs: build: runs-on: ubuntu-latest permissions: contents: read steps: - name: Harden Runner egress uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.11.0 with: egress-policy: block allowed-endpoints: > api.github.com:443 registry.npmjs.org:443 - name: Checkout (SHA-pinned) uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2Appendix
Evidence log: what’s confirmed and what’s withheld
| Claim | Status | Source |
|---|---|---|
Malicious commit 0e58ed8671d6b60d0890c21b07f8835ace038e67 was force-tagged across v1 to v45.0.7 using a compromised PAT | Confirmed | GHSA-mrrh-fwg8-r2c3 and StepSecurity |
Node.js loader fetched memdump.py from gist.githubusercontent.com and scraped Runner.Worker memory with sudo python3 | Confirmed | StepSecurity and Sysdig analysis |
| Double-base64 secrets printed to public workflow logs across impacted public repositories | Confirmed | GitHub Advisory and CISA |
Workflows pinned to full 40-char commit SHAs or blocking gist.githubusercontent.com egress were unaffected | Confirmed | StepSecurity and GitHub guidance |
Indicators of compromise
0e58ed8671d6b60d0890c21b07f8835ace038e67Malicious commit force-applied across v1 to v45.0.7 of tj-actions/changed-files.
https://gist.githubusercontent.com/nikitastupin/30e525b776c409e03c2d6f328f254965/raw/memdump.pySecondary Python memory-scraping payload downloaded by the tampered action.
Reproduction lab
Audits a local repository’s GitHub Actions workflows for unpinned mutable tags and verifies Harden-Runner egress block policies in CI.
# find every mutable action tag in your repo
grep -rnE "uses:[[:space:]]+[^@]+@(v[0-9]|main|master)" .github/workflows/