Skip to content

Vulnerable GitHub Actions leading to leakage of GITHUB_TOKEN and SONAR_TOKEN

Moderate
mbarbero published GHSA-vwx5-w7c3-rjq8 Mar 23, 2026

Package

actions eclipse/openvsx (GitHub Actions)

Affected versions

N/A

Patched versions

None

Description

Summary

A GitHub workflow used inside the openvsx repo is vulnerable to command execution. An attacker can create a fork with a branch name containing shell characters which then gets executed when passed to the Sonar scanning action.

Details

The following GitHub action is vulnerable:

https://github.com/eclipse/openvsx/blob/master/.github/workflows/sonar.yml

Specifically:

    - name: SonarCloud Scan on PR
      if: github.event.workflow_run.event == 'pull_request'
      uses: SonarSource/sonarqube-scan-action@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
      with:
        args: >
          -Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }}
          -Dsonar.pullrequest.key=${{ fromJson(steps.get_pr_data.outputs.data).number }}
          -Dsonar.pullrequest.branch=${{ fromJson(steps.get_pr_data.outputs.data).head.ref }}
          -Dsonar.pullrequest.base=${{ fromJson(steps.get_pr_data.outputs.data).base.ref }}

The attackers branch can be called $(whoami) and this will execute whoami when it reaches the sonarqube-scan-action GH action:

    - name: Run SonarScanner
      run: |
        args=(${{ inputs.args }})
        cmd=(${GITHUB_ACTION_PATH}/scripts/run-sonar-scanner-cli.sh "${args[@]}")
        "${cmd[@]}"

PoC

We created a local testbed to prove this vulnerability:

CleanShot 2025-05-01 at 11 00 49@2x

Impact

The GITHUB_TOKEN and SONAR_TOKEN can be stolen

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N

CVE ID

CVE-2026-2478

Weaknesses

Improper Neutralization of Special Elements used in a Command ('Command Injection')

The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. Learn more on MITRE.

Credits