Critical, CVSS 9.9GitHub ActionsPublished
j178/prek-action vulnerable to arbitrary code injection in composite action
GHSA-pwf7-47c3-mfhx
- Affected
- GitHub Actions j178/prek-action <= 1.0.5
- Fixed in
- 1.0.6· Vendor fix available
- Issue
- There are three potential attacks of arbitrary code injection vulnerability in the composite action at action.yml. Details The GitHub Action variables inputs.prek-version, inputs.extraargs, and inputs.extra-args can be used to execute arbitrary code in the context of the action. PoC The previous example will print all the environment variables, and it will expose MYSECRET environment variable value to the summary of the workflow. An attacker could potentially use this vector to compromise the security of the target repository, even passing unnotice because the action will run normally. Impact Critical, CWE-94
Recommended action: Upgrade to 1.0.6 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.