j178/prek-action vulnerable to arbitrary code injection in composite action
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- Code execution
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-94.
Summary
### 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.extra_args`, and `inputs.extra-args` can be used to execute arbitrary code in the context of the action. ### PoC ```yaml - uses: j178/[email protected] with: prek-version: $(printenv >> $GITHUB_STEP_SUMMARY && echo "0.2.2") extra_args: '&& echo "MY_SECRET with a character is: ${MY_SECRET:0:1}a${MY_SECRET:1}" >> $GITHUB_STEP_SUMMARY && echo ""' env: MY_SECRET: ${{ secrets.MY_SECRET }} ``` The previous example will print all the environment variables, and it will expose `MY_SECRET` 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
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | j178/prek-action (GitHub Actions) | before 1.0.6 | 1.0.6 | Patch available | GHSA-pwf7-47c3-mfhx |
- j178/prek-action (GitHub Actions) Vendor— Affected before 1.0.6 Fixed in 1.0.6 Patch available GHSA-pwf7-47c3-mfhx
Remediation
- Fix · GHSA-pwf7-47c3-mfhx j178/prek-action (GitHub Actions) Fixed in 1.0.6 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-pwf7-47c3-mfhx
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences