Security Digest · Critical advisory (no CVE assigned)
GHSA-pwf7-47c3-mfhx: j178/prek-action vulnerable to arbitrary code injection in composite action
Summary There are three potential attacks of arbitrary code injection vulnerability in the composite action at action.yml.
CVSS 9.9 Critical GitHub-reviewed · critical
Should you act?
- Only if you depend on one of the packages below, directly or transitively, in a vulnerable version. Check your lockfile with
grep -rn 'uses: <owner>/<action>' .github/workflows. - No CVE has been assigned, so it will not appear in CVE-based scanners that ignore GitHub advisories.
npm audit,pip-auditand Dependabot do read GitHub advisories.
Affected packages
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| GitHub Actions | j178/prek-action | <= 1.0.5 | 1.0.6 |
Details
Summary 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
CVSS: 9.9 (v3.1) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Sources and references
- GitHub Advisory GHSA-pwf7-47c3-mfhx github.com
- github.com github.com
- github.com github.com
Critical GitHub Actions advisories · Today’s Security Digest