Headline
CVE-2023-34111: grafanaplugin/release-pr-merged.yaml at master · taosdata/grafanaplugin
The Release PR Merged
workflow in the github repo taosdata/grafanaplugin is subject to a command injection vulnerability which allows for arbitrary code execution within the github action context due to the insecure usage of ${{ github.event.pull_request.title }}
in a bash command within the GitHub workflow. Attackers can inject malicious commands which will be executed by the workflow. This happens because ${{ github.event.pull_request.title }}
is directly passed to bash command on like 25 of the workflow. This may allow an attacker to gain access to secrets which the github action has access to or to otherwise make use of the compute resources.
Permalink
Cannot retrieve contributors at this time
name: “Release PR Merged”
on:
pull_request:
branches:
- master
types:
- closed
jobs:
release:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, ‘release:’)
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: master
fetch-depth: 0
- name: Extract version
id: extract-version
run: |
version=$(echo “${{ github.event.pull_request.title }}” | grep -o -P '(\d+\.\d+\.\d+)(-\S+)?’)
echo $version
echo ::set-output name=version::$version
- name: Version bump
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./scripts/release.sh ${{ steps.extract-version.outputs.version }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
tags: true