{"incident":{"slug":"tj-actions-cve-2025-30066","caseId":"BI-2025-004","organization":"tj-actions/changed-files","title":"tj-actions/changed-files: repointed tags shipped a memory scraper into public CI logs","shortSummary":"Repointed tags shipped a memory scraper that printed CI secrets into public build logs.","lede":"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.","incidentDate":"Mar 12–15, 2025","incidentDateIso":"2025-03-12","incidentEndIso":"2025-03-15","disclosedDate":"Mar 15, 2025","cve":"CVE-2025-30066","sourceUrl":"https://github.com/advisories/GHSA-mrrh-fwg8-r2c3","sourceAuthor":"StepSecurity and GitHub Advisory","vectorFilter":"CI supply chain","timeToDetect":"~24h","detectedBy":"StepSecurity Harden-Runner","initialAccess":{"label":"Compromised PAT","detail":"Compromised maintenance PAT force-updated mutable tags","evidence":"confirmed"},"blastRadius":"23,000+ downstream repos","whatItReachedShort":"Tags v1 to v45.0.7 repointed; Runner.Worker memory dumped to public logs","whatHeldShort":"Workflows pinned to a full commit SHA","revisions":[{"id":"Rev A","date":"Mar 16, 2025","note":"Compiled from StepSecurity Harden-Runner alert and GHSA-mrrh-fwg8-r2c3."}],"bodyMarkdown":"## How they got in\n\nUsing 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.\n\n## What it reached\n\nAn 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.\n\nFor public repositories, those build logs were globally readable without needing any outbound command-and-control server.\n\n## What held\n\nRepositories 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.\n\n> **Why stdout beat traditional C2 exfiltration**\n>\n> By printing double-base64 secrets into public workflow logs rather than posting them to an attacker domain, the payload avoided outbound data-exfiltration alerts on the second stage.\n>\n> Only the initial Gist payload download crossed an unexpected egress boundary, which is what StepSecurity caught.","narrative":{"howTheyGotIn":["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."],"whatItReached":["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."],"whatHeld":["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."],"sideNoteTitle":"Why stdout beat traditional C2 exfiltration","sideNoteParagraphs":["By printing double-base64 secrets into public workflow logs rather than posting them to an attacker domain, the payload avoided outbound data-exfiltration alerts on the second stage.","Only the initial Gist payload download crossed an unexpected egress boundary, which is what StepSecurity caught."]},"claims":[{"group":"How they got in","claim":"Malicious commit 0e58ed8671d6b60d0890c21b07f8835ace038e67 was force-tagged across v1 to v45.0.7 using a compromised PAT","evidence":"confirmed","source":"GHSA-mrrh-fwg8-r2c3 and StepSecurity"},{"group":"What it reached","claim":"Node.js loader fetched memdump.py from gist.githubusercontent.com and scraped Runner.Worker memory with sudo python3","evidence":"confirmed","source":"StepSecurity and Sysdig analysis"},{"group":"What it reached","claim":"Double-base64 secrets printed to public workflow logs across impacted public repositories","evidence":"confirmed","source":"GitHub Advisory and CISA"},{"group":"What held","claim":"Workflows pinned to full 40-char commit SHAs or blocking gist.githubusercontent.com egress were unaffected","evidence":"confirmed","source":"StepSecurity and GitHub guidance"}],"diagram":{"label":"tj-actions/changed-files CVE-2025-30066 attack path","zones":[{"id":"up","label":"Upstream repo and Gist","kind":"boundary","lane":0},{"id":"run","label":"Victim GitHub Actions runner","kind":"boundary","lane":1},{"id":"out","label":"Public build logs","kind":"boundary","lane":2},{"id":"sha","label":"SHA-pinned repos","kind":"isolated","lane":2}],"nodes":[{"id":"tj-atk","zone":"up","name":"Attacker","detail":"PAT leak inferred","kind":"attacker","ev":"inferred","at":0,"story":"The attacker acquired a maintainer bot PAT; exact initial compromise method of the bot token remains inferred.","when":"Mar 12, 2025","steps":[1]},{"id":"pat","zone":"up","name":"Maintainer bot PAT","detail":"Tags v1–v45.0.7 moved","kind":"compromised","ev":"confirmed","at":1,"story":"Compromised automation PAT force-pointed mutable version tags at commit 0e58ed8671d6b60d0890c21b07f8835ace038e67.","when":"Mar 12 to 14, 2025","steps":[1],"ctl":["tj-k1"]},{"id":"gist","zone":"up","name":"GitHub Gist payload","detail":"memdump.py","kind":"attacker","ev":"confirmed","at":0,"story":"External Gist (nikitastupin/30e525b776c409e03c2d6f328f254965) serving the Python Runner.Worker memory scraper.","when":"Mar 14, 2025","steps":[2],"ctl":["tj-k2","tj-d1"]},{"id":"loader","zone":"run","name":"Tampered action","detail":"Obfuscated Node.js","kind":"compromised","ev":"confirmed","at":1,"story":"Consumer workflows referencing mutable @v* tags fetched the tampered action automatically and executed curl to fetch memdump.py.","when":"Mar 14 to 15, 2025","steps":[1,2],"ctl":["tj-k1","tj-k2"]},{"id":"py","zone":"run","name":"memdump.py","detail":"sudo python3","kind":"compromised","ev":"confirmed","at":2,"story":"Downloaded Python payload piped straight to passwordless sudo python3 inside the Ubuntu runner.","when":"Mar 14 to 15, 2025","steps":[2,3],"ctl":["tj-k2"]},{"id":"mem","zone":"run","name":"Runner.Worker mem","detail":"/proc/<pid>/mem read","kind":"compromised","ev":"confirmed","at":3,"story":"Attached to Runner.Worker process memory with sudo and harvested AWS, GCP, npm and GitHub secrets.","when":"Mar 14 to 15, 2025","steps":[3,4]},{"id":"privlog","zone":"run","name":"Private repo logs","detail":"Still tainted on disk","kind":"nearMiss","ev":"confirmed","at":0,"story":"Private workflows still printed secrets into persistent private build logs, requiring log purging and key rotation.","when":"Mar 14 to 15, 2025"},{"id":"publog","zone":"out","name":"Public build logs","detail":"Double-base64 stdout","kind":"compromised","ev":"confirmed","at":4,"story":"Double-base64 encoding evaded GitHub log masking, leaving secrets globally readable in public Actions logs.","when":"Mar 14 to 15, 2025","steps":[4]},{"id":"pinned","zone":"sha","name":"SHA-pinned CI","detail":"Not reached","kind":"isolated","ev":"confirmed","at":0,"story":"Workflows pinned to immutable 40-character commit SHAs never pulled the force-moved tag.","when":"Not reached"}],"edges":[{"id":"tje0","from":"tj-atk","to":"pat","kind":"inferred","step":1},{"id":"tje1","from":"pat","to":"loader","kind":"attack","step":1},{"id":"tje-wire","from":"loader","to":"py","kind":"wiring","step":1},{"id":"tje2","from":"gist","to":"py","kind":"attack","step":2},{"id":"tje3","from":"py","to":"mem","kind":"attack","step":3},{"id":"tje4","from":"mem","to":"publog","kind":"attack","step":4},{"id":"tjnm","from":"mem","to":"privlog","kind":"nearMiss","step":3}],"steps":[{"n":1,"time":"Mar 12–14","short":"Mar 12","text":"Tags v1–v45.0.7 repointed to 0e58ed86","say":"Compromised PAT moves mutable tags across 23,000+ dependent repositories to the malicious commit."},{"n":2,"time":"Mar 14","short":"Mar 14","text":"Loader curls memdump.py into sudo python3","say":"Obfuscated Node.js action downloads memdump.py from gist.githubusercontent.com and pipes it to sudo python3."},{"n":3,"time":"Mar 14","short":"Mar 14","text":"Runner.Worker memory scraped with sudo","say":"Python payload scans Runner.Worker memory for cloud keys, npm tokens and GitHub PATs."},{"n":4,"time":"Mar 14–15","short":"Mar 14–15","text":"Double-base64 printed into public logs","say":"Encoded secrets print directly to public build logs, evading GitHub masking until v46.0.1 cleanup."}],"controls":[{"id":"tj-k1","step":1,"kind":"control","name":"Pin 40-char SHA","tag":"Stops step 1","long":"Referencing actions by full commit SHA prevents retroactive tag overwrites from ever entering your runner.","nodeId":"loader"},{"id":"tj-k2","step":2,"kind":"control","name":"Egress allowlist","tag":"Stops step 2","long":"StepSecurity Harden-Runner in block mode denies unexpected runner connections to gist.githubusercontent.com.","nodeId":"py"},{"id":"tj-d1","step":2,"kind":"fired","name":"Harden-Runner Mar 14","tag":null,"long":"StepSecurity Harden-Runner detected the anomalous call to gist.githubusercontent.com on Mar 14 and alerted the community.","nodeId":"gist"}],"detectedAt":{"time":"Mar 14, 2025","short":"Detected Mar 14","text":"StepSecurity Harden-Runner detected the anomalous outbound request to gist.githubusercontent.com."}},"plate":{"W":762,"H":380,"label":"tj-actions/changed-files CVE-2025-30066 attack path","zones":[{"id":"up","label":"Upstream repo and Gist","kind":"boundary","x":8,"y":16,"w":213,"h":314},{"id":"run","label":"Victim GitHub Actions runner","kind":"boundary","x":259,"y":16,"w":256,"h":314},{"id":"out","label":"Public build logs","kind":"boundary","x":553,"y":16,"w":201,"h":110},{"id":"sha","label":"SHA-pinned repos","kind":"isolated","x":553,"y":146,"w":201,"h":110}],"nodes":[{"id":"tj-atk","name":"Attacker","detail":"PAT leak inferred","kind":"attacker","ev":"inferred","x":20,"y":52,"w":189,"at":0,"story":"The attacker acquired a maintainer bot PAT; exact initial compromise method of the bot token remains inferred.","when":"Mar 12, 2025","steps":[1]},{"id":"gist","name":"GitHub Gist payload","detail":"memdump.py","kind":"attacker","ev":"confirmed","x":20,"y":154,"w":189,"at":0,"story":"External Gist (nikitastupin/30e525b776c409e03c2d6f328f254965) serving the Python Runner.Worker memory scraper.","when":"Mar 14, 2025","steps":[2],"ctl":["tj-k2","tj-d1"]},{"id":"pat","name":"Maintainer bot PAT","detail":"Tags v1–v45.0.7 moved","kind":"compromised","ev":"confirmed","x":20,"y":256,"w":189,"at":1,"story":"Compromised automation PAT force-pointed mutable version tags at commit 0e58ed8671d6b60d0890c21b07f8835ace038e67.","when":"Mar 12 to 14, 2025","steps":[1],"ctl":["tj-k1"]},{"id":"loader","name":"Tampered action","detail":"Obfuscated Node.js","kind":"compromised","ev":"confirmed","x":271,"y":52,"w":184,"at":1,"story":"Consumer workflows referencing mutable @v* tags fetched the tampered action automatically and executed curl to fetch memdump.py.","when":"Mar 14 to 15, 2025","steps":[1,2],"ctl":["tj-k1","tj-k2"]},{"id":"py","name":"memdump.py","detail":"sudo python3","kind":"compromised","ev":"confirmed","x":271,"y":154,"w":184,"at":2,"story":"Downloaded Python payload piped straight to passwordless sudo python3 inside the Ubuntu runner.","when":"Mar 14 to 15, 2025","steps":[2,3],"ctl":["tj-k2"]},{"id":"mem","name":"Runner.Worker mem","detail":"/proc/<pid>/mem read","kind":"compromised","ev":"confirmed","x":271,"y":256,"w":184,"at":3,"story":"Attached to Runner.Worker process memory with sudo and harvested AWS, GCP, npm and GitHub secrets.","when":"Mar 14 to 15, 2025","steps":[3,4]},{"id":"publog","name":"Public build logs","detail":"Double-base64 stdout","kind":"compromised","ev":"confirmed","x":565,"y":52,"w":177,"at":4,"story":"Double-base64 encoding evaded GitHub log masking, leaving secrets globally readable in public Actions logs.","when":"Mar 14 to 15, 2025","steps":[4]},{"id":"pinned","name":"SHA-pinned CI","detail":"Not reached","kind":"isolated","ev":"confirmed","x":569,"y":182,"w":168,"at":0,"story":"Workflows pinned to immutable 40-character commit SHAs never pulled the force-moved tag.","when":"Not reached"}],"edges":[{"id":"tje0","kind":"inferred","step":1,"pts":[[115,110],[115,256]]},{"id":"tje1","kind":"attack","step":1,"pts":[[209,285],[240,285],[240,81],[271,81]]},{"id":"tje-wire","kind":"wiring","step":1,"pts":[[363,110],[363,154]]},{"id":"tje2","kind":"attack","step":2,"pts":[[209,183],[271,183]]},{"id":"tje3","kind":"attack","step":3,"pts":[[363,212],[363,256]]},{"id":"tje4","kind":"attack","step":4,"pts":[[455,285],[510,285],[510,81],[565,81]]}],"balloons":{"1":[115,183],"2":[240,183],"3":[363,234],"4":[510,183]},"noroute":[{"x1":515,"x2":553,"y":198,"label":"No route"}],"bps":[{"id":"tj-k1","step":1,"kind":"control","at":[115,183],"name":"Pin 40-char SHA","tag":"Stops step 1","lead":[[115,172],[115,155],[127,155]],"lx":133,"ly":159,"anchor":"start","long":"Referencing actions by full commit SHA prevents retroactive tag overwrites from ever entering your runner.","nodeId":"loader"},{"id":"tj-k2","step":2,"kind":"control","at":[240,183],"name":"Egress allowlist","tag":"Stops step 2","lead":[[240,194],[240,205],[252,205]],"lx":258,"ly":209,"anchor":"start","long":"StepSecurity Harden-Runner in block mode denies unexpected runner connections to gist.githubusercontent.com.","nodeId":"py"},{"id":"tj-d1","step":2,"kind":"fired","at":[240,183],"name":"Harden-Runner Mar 14","tag":null,"lead":[[240,172],[240,155],[252,155]],"lx":258,"ly":159,"anchor":"start","long":"StepSecurity Harden-Runner detected the anomalous call to gist.githubusercontent.com on Mar 14 and alerted the community.","nodeId":"gist"}],"steps":[{"n":1,"time":"Mar 12–14","short":"Mar 12","text":"Tags v1–v45.0.7 repointed to 0e58ed86","say":"Compromised PAT moves mutable tags across 23,000+ dependent repositories to the malicious commit."},{"n":2,"time":"Mar 14","short":"Mar 14","text":"Loader curls memdump.py into sudo python3","say":"Obfuscated Node.js action downloads memdump.py from gist.githubusercontent.com and pipes it to sudo python3."},{"n":3,"time":"Mar 14","short":"Mar 14","text":"Runner.Worker memory scraped with sudo","say":"Python payload scans Runner.Worker memory for cloud keys, npm tokens and GitHub PATs."},{"n":4,"time":"Mar 14–15","short":"Mar 14–15","text":"Double-base64 printed into public logs","say":"Encoded secrets print directly to public build logs, evading GitHub masking until v46.0.1 cleanup."}],"stripRows":[{"id":"sr-tj-atk","nodeId":"tj-atk","lineStyle":"inferred"},{"id":"sr-gist","nodeId":"gist","lineStyle":"solid"},{"id":"sr-step-1","nodeId":"pat","step":1,"lineStyle":"solid","companionNodeIds":["loader"],"bpIds":["tj-k1"]},{"id":"sr-step-2","nodeId":"py","step":2,"lineStyle":"solid","bpIds":["tj-k2","tj-d1"]},{"id":"sr-step-3","nodeId":"mem","step":3,"lineStyle":"solid"},{"id":"sr-step-4","nodeId":"publog","step":4,"lineStyle":"none"}],"detectedAt":{"time":"Mar 14, 2025","short":"Detected Mar 14","text":"StepSecurity Harden-Runner detected the anomalous outbound request to gist.githubusercontent.com."}},"codeArtifacts":[{"id":"tj-workflow","filename":"ci-hardened.yml","language":"yaml","description":"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.","code":"jobs:\n  build:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n    steps:\n      - name: Harden Runner egress\n        uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.11.0\n        with:\n          egress-policy: block\n          allowed-endpoints: >\n            api.github.com:443\n            registry.npmjs.org:443\n\n      - name: Checkout (SHA-pinned)\n        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2"},{"id":"tj-audit","filename":"find-unpinned-actions.sh","language":"sh","description":"Scan every workflow file for mutable @v* or branch references vulnerable to upstream tag overwrites.","code":"# Flag any GitHub Action not pinned to a 40-hex commit SHA\ngrep -rnE \"uses:[[:space:]]+[^@]+@(v[0-9]|main|master)\" .github/workflows/ || \\\n  echo \"All workflow actions are pinned to immutable SHAs.\""}],"reproductionLab":{"title":"Reproduction lab","summary":"Audits a local repository’s GitHub Actions workflows for unpinned mutable tags and verifies Harden-Runner egress block policies in CI.","bundleMeta":"Markdown playbook, MIT license","safetyNote":"Read-only static audit script safe to run on any repository.","commands":"# find every mutable action tag in your repo\ngrep -rnE \"uses:[[:space:]]+[^@]+@(v[0-9]|main|master)\" .github/workflows/"},"iocs":[{"type":"commit","value":"0e58ed8671d6b60d0890c21b07f8835ace038e67","context":"Malicious commit force-applied across v1 to v45.0.7 of tj-actions/changed-files."},{"type":"url","value":"https://gist.githubusercontent.com/nikitastupin/30e525b776c409e03c2d6f328f254965/raw/memdump.py","context":"Secondary Python memory-scraping payload downloaded by the tampered action."}],"publishedAt":"2025-03-16T11:30:00Z","origin":"editorial"}}