{"id":"CVE-2023-52137","published":"2023-12-29T17:08:49Z","modified":"2024-08-02T22:48:12Z","title":"GitHub Action tj-actions/verify-changed-files is vulnerable to command injection in output filenames","vendor":"tj-actions","product":"verify-changed-files","tier":"tail","description":{"text":"The [`tj-actions/verify-changed-files`](https://github.com/tj-actions/verify-changed-files) action allows for command injection in changed filenames, allowing an attacker to execute arbitrary code and potentially leak secrets. The [`verify-changed-files`](https://github.com/tj-actions/verify-changed-files) workflow returns the list of files changed within a workflow execution. This could potentially allow filenames that contain special characters such as `;` which can be used by an attacker to take over the [GitHub Runner](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners) 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 `GITHUB_TOKEN` if triggered on other events than `pull_request`.\n\nThis has been patched in versions [17](https://github.com/tj-actions/verify-changed-files/releases/tag/v17) and [17.0.0](https://github.com/tj-actions/verify-changed-files/releases/tag/v17.0.0) by enabling `safe_output` by default and returning filename paths escaping special characters for bash environments.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.7,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02621,"percentile":0.85833,"provenance":"source"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"references":[{"url":"https://github.com/tj-actions/verify-changed-files/security/advisories/GHSA-ghm2-rq8q-wrhc","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tj-actions/verify-changed-files/commit/498d3f316f501aa72485060e8c96fde7b2014f12","tags":["x_refsource_MISC"]},{"url":"https://github.com/tj-actions/verify-changed-files/commit/592e305da041c09a009afa4a43c97d889bed65c3","tags":["x_refsource_MISC"]}],"priority":{"score":22.6,"factors":[{"name":"EPSS percentile","points":17.17},{"name":"CVSS severity","points":5.39}]},"vendorSlug":"tj-actions","affectedVersions":[{"vendor":"tj-actions","product":"verify-changed-files","versions":["< 17.0.0"]}],"affected":[{"ecosystem":"GitHub Actions","package":"tj-actions/verify-changed-files","vulnerableRanges":["<17"],"patched":["17"],"from":["GHSA-ghm2-rq8q-wrhc"],"provenance":"source"}],"summary":{"text":"The tj-actions/verify-changed-files GitHub Action fails to properly handle changed filenames, so filenames containing special characters such as ; can be injected into a run block when its output is used unsafely. An attacker who can get a file with such a name into a workflow run, with the workflow triggered by an event other than pull_request, could execute arbitrary code on the GitHub Runner and potentially steal secrets such as GITHUB_TOKEN.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:42:09Z"},"euvd":{"id":"EUVD-2024-0357","exploited":false,"provenance":"source"}}