CVE-2025-30066: tj-actions/changed-files GitHub Action Embedded Malicious Code Vulnerability
tj-actions changed-files before 46 allows remote attackers to discover secrets by reading actions logs. (The tags v1 through v45.0.7 were affected on 2025-03-14 and 2025-03-15 because they were modified by a threat actor to point at commit 0e58ed8, which contained malicious updateFeatures code.)
CVE-2025-30066 is an embedded malicious code vulnerability in the tj-actions/changed-files GitHub Action. The flaw allows a remote attacker to discover secrets by reading GitHub Actions workflow logs. Those secrets can include AWS access keys, GitHub personal access tokens, npm tokens, and private RSA keys. For any organization that uses this Action in CI/CD pipelines, the risk is unauthorized access to cloud accounts, source repositories, package registries, and cryptographic material that may be present in the environment.
Because the Action is commonly referenced by version tag or commit SHA in workflow YAML files, the malicious code can execute during normal pipeline runs and write sensitive values into logs that are later readable by an attacker. Confirm exact impact and affected references against the vendor advisory and CISA guidance.
How it works
The weakness is classified as CWE-506 (Embedded Malicious Code). In this case the tj-actions/changed-files GitHub Action itself contains code that was not intended by legitimate users of the Action. When a workflow that includes the Action runs, the embedded code can cause secrets that are available to the runner—environment variables, tokens, keys, or other credentials—to be written into the GitHub Actions workflow logs.
An attacker who can later read those logs (for example through repository access, a compromised account, or public log visibility) obtains the secrets without needing to compromise the runner host directly. The CISA summary states that the secrets may include valid AWS access keys, GitHub personal access tokens (PATs), npm tokens, and private RSA keys. No further exploit mechanics or payload details are provided here; treat any public proof-of-concept claims with caution and verify against the official advisory.
Am I affected? How to find it in your systems
The component runs inside GitHub Actions workflows, typically on GitHub-hosted or self-hosted runners that execute CI/CD jobs. It is referenced in workflow YAML files under the name tj-actions/changed-files (often pinned by a tag such as @v* or by a commit SHA).
- Inventory: Search every repository’s .github/workflows directory (and any reusable workflow or composite Action that may call it) for the string “tj-actions/changed-files”. Also check organization-level workflow templates and third-party Actions that may wrap it.
- Version and configuration check: Note the exact ref (tag, branch, or SHA) used. Because the vulnerability is embedded malicious code rather than a traditional buffer overflow, any use of a compromised version is potentially affected; confirm the safe versions or replacement guidance against the vendor advisory.
- Telemetry and log signs: Review GitHub Actions run logs for unexpected output that contains credential-like strings (long base64 blobs, AWS key patterns, “ghp_” tokens, private-key headers). Enable and examine audit logs for unusual workflow runs, especially those that dump environment variables or secrets. Look for recent changes to workflow files that introduced or updated the Action.
If the Action is present in any workflow that has access to secrets, treat the repository and any downstream systems that consume those secrets as potentially exposed until verified otherwise.
How to remediate
Apply the vendor update or remediation steps named in the official advisory for tj-actions/changed-files as the first priority. CISA directs organizations to apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
- Remove or replace every reference to the compromised Action with a verified clean version or an alternative that performs the same “changed files” detection without the malicious code.
- Rotate all secrets that could have been present in any workflow that used the Action: AWS access keys, GitHub PATs, npm tokens, SSH/RSA private keys, and any other credentials injected into the runner environment.
- Review and tighten workflow permissions (contents, packages, id-token, etc.) so that future Actions receive only the least privilege required.
- Pin Actions to full commit SHAs rather than mutable tags, and prefer Actions from verified publishers when possible.
After remediation, re-run critical pipelines and confirm that logs no longer contain unexpected secret material.
If you can't patch immediately
Until the vendor update can be applied or the Action removed, reduce exposure with compensating controls:
- Discontinue use of tj-actions/changed-files immediately; replace the step with a temporary local script or a different, audited Action that does not introduce the same risk.
- Segment: Move sensitive workflows to runners that have no access to high-value secrets, or isolate the affected repositories behind stricter branch-protection and environment rules.
- Virtual patching / monitoring: Add workflow steps that redact or fail the job if known secret patterns appear in logs. Enable GitHub secret scanning and push protection if not already active. Alert on any workflow that dumps env or uses the compromised Action.
- Access control: Restrict who can read Actions logs and who can approve workflow runs that require secrets. Temporarily revoke or scope-down long-lived tokens until rotation is complete.
These measures lower the chance of secret exfiltration but do not eliminate the underlying malicious code; treat them as temporary only.
If your data may have been exposed
Actively exploited vulnerabilities of this class can lead to credential theft and subsequent account or data breaches. Immediately rotate every secret that may have appeared in workflow logs, review cloud and GitHub audit trails for unauthorized use of those credentials, and treat any systems that accepted the stolen tokens as potentially compromised. You can run a free exposure scan of your email address to check whether it appears in known breach data sets and take further containment steps as needed.
AICompiled with AI assistance from public sources and published under our editorial standards.
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:NReferences
- blog.gitguardian.com/compromised-tj-actions/
- github.com/chains-project/maven-lockfile/pull/1111
- github.com/espressif/arduino-esp32/issues/11127
- github.com/github/docs/blob/962a1c8dccb8c0f66548b324e5b921b5e4fbc3d6/content/act
- github.com/modal-labs/modal-examples/issues/1100
- github.com/rackerlabs/genestack/pull/903
- github.com/tj-actions/changed-files/blob/45fb12d7a8bedb4da42342e52fe054c6c2c3fd7
- github.com/tj-actions/changed-files/issues/2463