# GHSA-pwf7-47c3-mfhx: j178/prek-action vulnerable to arbitrary code injection in composite action

- Severity: Critical 9.9 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2025-09-29T17:51:19.000Z
- Modified: 2025-09-29T17:51:19.000Z
- Weaknesses: CWE-94

## Description

### 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/prek-action@v1.0.5
  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

(As written by GitHub Advisory Database.)

## Affected

- j178/prek-action (GitHub Actions): before 1.0.6

## References

- <https://github.com/j178/prek-action/security/advisories/GHSA-pwf7-47c3-mfhx> (web)
- <https://github.com/j178/prek-action/commit/6b7c6ef5c3875c766893b881b40773cd5605bde3> (web)
- <https://github.com/j178/prek-action> (package)

## Sources

- GitHub Advisory Database: [GHSA-pwf7-47c3-mfhx](https://github.com/advisories/GHSA-pwf7-47c3-mfhx), CC-BY-4.0, modified 2025-09-29

---

Page: https://cve.day/GHSA-pwf7-47c3-mfhx · Whole record: https://cve.day/GHSA-pwf7-47c3-mfhx.json · Rebuilt by cve.day 2026-11-25T22:56:20.041Z
