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.

Upstream repo and GistVictim GitHub Actions runnerPublic build logsStayed safeAttackerPAT leak inferredGitHub Gist payloadmemdump.pyMaintainer bot PATTags v1–v45.0.7 movedTampered actionObfuscated Node.jsmemdump.pysudo python3Runner.Worker mem/proc/<pid>/mem readPublic build logsDouble-base64 stdoutSHA-pinned CINot reached1234
1Mar 12–14

Compromised PAT moves mutable tags across 23,000+ dependent repositories to the malicious commit.

InferredWhere to stop it: pin 40-char SHA
  1. Mar 12–14

    Compromised PAT moves mutable tags across 23,000+ dependent repositories to the malicious commit.

    AttackertoMaintainer bot PATTampered action
  2. Mar 14

    Obfuscated Node.js action downloads memdump.py from gist.githubusercontent.com and pipes it to sudo python3.

    GitHub Gist payloadTampered actiontomemdump.py
  3. Mar 14

    Python payload scans Runner.Worker memory for cloud keys, npm tokens and GitHub PATs.

    memdump.pytoRunner.Worker mem
  4. Mar 14–15

    Encoded secrets print directly to public build logs, evading GitHub masking until v46.0.1 cleanup.

    Runner.Worker memtoPublic 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.yml

Pin 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.2

Appendix

Evidence log: what’s confirmed and what’s withheld4 claims
ClaimStatusSource
Malicious commit 0e58ed8671d6b60d0890c21b07f8835ace038e67 was force-tagged across v1 to v45.0.7 using a compromised PATConfirmedGHSA-mrrh-fwg8-r2c3 and StepSecurity
Node.js loader fetched memdump.py from gist.githubusercontent.com and scraped Runner.Worker memory with sudo python3ConfirmedStepSecurity and Sysdig analysis
Double-base64 secrets printed to public workflow logs across impacted public repositoriesConfirmedGitHub Advisory and CISA
Workflows pinned to full 40-char commit SHAs or blocking gist.githubusercontent.com egress were unaffectedConfirmedStepSecurity and GitHub guidance
Indicators of compromise2 indicators
  • 0e58ed8671d6b60d0890c21b07f8835ace038e67

    Malicious commit force-applied across v1 to v45.0.7 of tj-actions/changed-files.

  • https://gist.githubusercontent.com/nikitastupin/30e525b776c409e03c2d6f328f254965/raw/memdump.py

    Secondary Python memory-scraping payload downloaded by the tampered action.

Reproduction labMarkdown playbook, MIT license

Audits a local repository’s GitHub Actions workflows for unpinned mutable tags and verifies Harden-Runner egress block policies in CI.

Safety note: Read-only static audit script safe to run on any repository.

# find every mutable action tag in your repo
grep -rnE "uses:[[:space:]]+[^@]+@(v[0-9]|main|master)" .github/workflows/
tj-actions/changed-files: repointed tags shipped a memory scraper into public CI logs | breachidents