The wipcheck.yml
GitHub workflow in graphql-dotnet, server, parser and authorization repositories is vulnerable to arbitrary command injection.
graphql-dotnet GitHub repositories
graphql-dotnet
server
parser
authorization
A Pull Request title is used to format a bash script:
name: Check if PR title contains [WIP]
on:
pull_request:
types:
- opened # when PR is opened
- edited # when PR is edited
- synchronize # when code is added
- reopened # when a closed PR is reopened
jobs:
check-title:
runs-on: ubuntu-latest
steps:
- name: Fail build if pull request title contains [WIP]
if: ${{ contains(github.event.pull_request.title, '[WIP]') }} # This function is case insensitive.
run: |
echo Warning! PR title "${{ github.event.pull_request.title }}" contains [WIP]. Remove [WIP] from the title when PR is ready.
exit 1
This vulnerability allows for arbitrary command injection into the bash script. For a proof a concept a Pull Request with the following title title"; sleep 10 #
will delay the action by ten seconds.
Workflows triggered by pull_request
have limited repository token and no access to secrets. The attacker couldn't do much except CI DoS attacks or running their own code in the context of the GitHub action runner.
This issue was discovered and reported by GHSL team member @JarLob (Jaroslav Lobačevski).
You can contact the GHSL team at securitylab@github.com
, please include a reference to GHSL-2020-231
in any communication regarding this issue.