tj-actions/changed-files has Potential Actions command injection in output filenames (GHSL-2023-271)
Published Dec 27, 2023 · Updated Nov 3, 2026
Original summary
Normalized public record · Updated Nov 3, 2026
tj-actions/changed-files has Potential Actions command injection in output filenames (GHSL-2023-271)
Publisher and source text is retained separately from QFinch interpretation.
QFinch assessment
The tj-actions/changed-files workflow allows for command injection in changed filenames, allowing an attacker to execute arbitrary code and potentially leak secrets.
Potential impact
This issue may lead to arbitrary command execution in the GitHub Runner.
Technical context
The changed-files action returns a list of files changed in a commit or pull request which provides an escapejson input enabled by default, only escapes " for JSON values. This could potentially allow filenames that contain special characters such as ; and \ (backtick) which can be used by an attacker to take over the GitHub Runner if the output value is used in a raw fashion (thus being directly replaced before execution) inside a run block. By running custom commands an attacker may be able to steal secrets such as GITHUBTOKEN if triggered on other events than pullrequest. For example on push. Proof of Concept 1. Submit a pull request to a repository with a new file injecting a command. For example $(whoami).txt which is a valid filename. 2. Upon approval of the workflow (triggered by the pull request), the action will get executed and the malicious pull request filename will flow into the List all changed files step below. Example output:
Evidence: public source recordsAffected products
| Affected package, product or range | Fix status |
|---|---|
| Consult the referenced vendor advisory for affected versions. | Consult source advisory |
Matching a version is only one part of assessing exposure. QFinch has not assessed your environment on this public page.
Remediation
Apply the vendor-supported fixed release or mitigation, then verify the affected component is no longer reachable.
- Confirm the affected product and reachable code path exist in your environment.
- Apply the vendor-supported patch or mitigation from the primary advisory.
- Rescan the exact deployed revision and retain verification evidence.
Evidence coverage
- SSVC priority
- MEDIUM
- Confidence
- Not available
- Aliases
- None reported
Scores appear only when corresponding evidence exists. Missing data is never interpreted as zero risk.
Sources and record history
Record history
Published Dec 27, 2023 · Last refreshed Nov 3, 2026