Findings

CVE-2023-51664

tj-actions/changed-files has Potential Actions command injection in output filenames (GHSL-2023-271)

Published Jan 2, 2024 · updated Sep 10, 2026

### Summary The workflow allows for command injection in changed filenames, allowing an attacker to execute arbitrary code and potentially leak secrets. ### Details The [ ](https://github.com/tj-actions/changed-files) action returns a list of files changed in a commit or pull request which provides an input [enabled by default](https://github.com/tj-actions/changed-files/blob/94549999469dbfa032becf298d95c87a14c34394/action.yml#L136), only escapes for JSON values. This could potentially allow filenames that contain special characters such as and \ run GITHUB_TOKEN pull_request push $(whoami).txt List all changed files safe_output (backtick), $, (), etc for bash environments. - A safe recommendation of using environment variables to store unsafe outputs. ### Resources * [Keeping your GitHub Actions and workflows secure Part 2: Untrusted input](https://securitylab.github.com/research/github-actions-untrusted-input/) * [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Jan 2, 2024 · GitHub Advisory Database

    Detected

    ### Summary The workflow allows for command injection in changed filenames, allowing an attacker to execute arbitrary code and potentially leak secrets. ### Details The [ ](https://github.com/tj-actions/changed-files) action returns a list of files changed in a commit or pull request which provides an input [enabled by default](https://github.com/tj-actions/changed-files/blob/94549999469dbfa032bec

  2. Sep 10, 2026 · GitHub Advisory Database

    Fix available

    tj-actions/changed-files fixed in 41

  3. Sep 10, 2026 · GitHub Advisory Database

    Fix available

    tj-actions/changed-files fixed in 41

  4. Sep 10, 2026 · GitHub Advisory Database

    Updated

    ### Summary The workflow allows for command injection in changed filenames, allowing an attacker to execute arbitrary code and potentially leak secrets. ### Details The [ ](https://github.com/tj-actions/changed-files) action returns a list of files changed in a commit or pull request which provides an input [enabled by default](https://github.com/tj-actions/changed-files/blob/94549999469dbfa032bec

Affected

  • GitHub Actions tj-actions/changed-files0 → 41

Sources

  • CVE.orgVulnerability recordCVE-2023-51664

    Official CVE identifier

    cve.org
  • GitHub Advisory DatabasePackage advisoryGHSA-mcph-m25j-8j63

    GitHub Advisory Database record mirrored by OSV.

    github.com
  • OSV.devPackage advisoryGHSA-mcph-m25j-8j63

    tj-actions/changed-files has Potential Actions command injection in output filenames (GHSL-2023-271)

    osv.dev

References