GHSA-pwf7-47c3-mfhx: J178/prek action J178/prek-action Vulnerable To Arbitrary Code Vulnerability
CRITICALGHSA-pwf7-47c3-mfhx is a CRITICAL (CVSS 9.9) j178/prek-action vulnerable to arbitrary code vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting J178/prek action libraries in the GitHub Actions ecosystem. The issue involves j178/prek-action vulnerable to arbitrary code injection in composite action. Remediation is available by upgrading affected packages to version 1.0.6.
GHSA-pwf7-47c3-mfhx at a Glance
Security Impact
CVSS: 9.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H).
How to Fix GHSA-pwf7-47c3-mfhx
To remediate this vulnerability, upgrade all affected J178/prek action dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade j178/prek-action to 1.0.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for j178/prek-action
How to Check if You Are Affected
To determine whether your application is affected by GHSA-pwf7-47c3-mfhx, inspect your project dependencies for J178/prek action:
inspect dependencies for j178/prek-action
Analyze the terminal output to locate any version of J178/prek action in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.6), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In J178/prek action, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-pwf7-47c3-mfhx Affected J178/prek action Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
j178/prek-action
|
GitHub Actions |
< 1.0.6
|
1.0.6
|
References
Frequently Asked Questions
What is GHSA-pwf7-47c3-mfhx?
Which J178/prek action versions are affected?
What version fixes GHSA-pwf7-47c3-mfhx?
Is j178/prek-action affected?
What is the CVSS score of GHSA-pwf7-47c3-mfhx?
What CWE is associated with GHSA-pwf7-47c3-mfhx?
How can I check GitHub Actions dependencies for GHSA-pwf7-47c3-mfhx?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pwf7-47c3-mfhx",
"modified" : "2025-09-29T17:51:19Z",
"published" : "2025-09-29T17:51:19Z",
"aliases" : [ ],
"summary" : "j178/prek-action vulnerable to arbitrary code injection in composite action",
"details" : "### Summary\nThere are three potential attacks of arbitrary code injection vulnerability in the composite action at _action.yml_.\n\n### Details\nThe 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.\n\n### PoC\n```yaml\n- uses: j178/prek-action@v1.0.5\n with:\n prek-version: $(printenv >> $GITHUB_STEP_SUMMARY && echo \"0.2.2\")\n extra_args: '&& echo \"MY_SECRET with a character is: ${MY_SECRET:0:1}a${MY_SECRET:1}\" >> $GITHUB_STEP_SUMMARY && echo \"\"'\n env:\n MY_SECRET: ${{ secrets.MY_SECRET }}\n```\n\nThe 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.\n\n### Impact\nCritical, CWE-94",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "GitHub Actions",
"name" : "j178/prek-action"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.0.5"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/j178/prek-action/security/advisories/GHSA-pwf7-47c3-mfhx"
}, {
"type" : "WEB",
"url" : "https://github.com/j178/prek-action/commit/6b7c6ef5c3875c766893b881b40773cd5605bde3"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/j178/prek-action"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-29T17:51:19Z",
"nvd_published_at" : null
}
}