The vulnerability, GHSA-phf6-hm3h-x8qp, is a command injection flaw within the GitHub Actions workflow defined in .github/workflows/scalafmt-fix.yml of the broadinstitute/cromwell repository.
The root cause is the direct interpolation of untrusted user input, specifically github.event.comment.body, into a shell script executed by the run command within the 'Check for ScalaFmt Comment' step. When a user comments on an issue, if the comment contained malicious shell commands formatted to exploit this interpolation, these commands would be executed on the GitHub Actions runner with the permissions of the GITHUB_TOKEN.
The provided commit dc2c26abd31149e296f73ce4e43a36c0c0317b0d remediates this specific vulnerability by removing the entire .github/workflows/scalafmt-fix.yml file, thereby eliminating the vulnerable step and script.
An attacker exploiting this vulnerability could exfiltrate sensitive secrets accessible to the workflow, such as the GITHUB_TOKEN (which had write permissions to the repository) and BROADBOT_GITHUB_TOKEN. This could lead to a full repository takeover or unauthorized modifications.
The analysis of the commit diff clearly shows the removal of the vulnerable run block, confirming its role in the vulnerability. While the vulnerability description mentions a PoC targeting .github/workflows/update_pylon_issue.yml, the provided commit only addresses the scalafmt-fix.yml file. Therefore, the identified vulnerable function is confined to the changes in this specific commit.
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| broadinstitute/cromwell | actions | >= 87, < 90 | 90 |