NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · GitHub Actions

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

criticalCVSS 3.1 9.9

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.

Published Sep 29, 2025

Affected packages

j178/prek-action

Ecosystem
GitHub Actions
Affected
<= 1.0.5
Fixed in
1.0.6

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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

- 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

Credited to mondeja.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology