---
title: "GHSA-pwf7-47c3-mfhx: j178/prek-action vulnerable to arbitrary code injection in composite action"
url: https://erroneo.us/security/ghsa/GHSA-pwf7-47c3-mfhx/
description: "GHSA-pwf7-47c3-mfhx (critical, GitHub Actions): j178/prek-action vulnerable to arbitrary code injection in composite action. Summary There are three…"
type: advisory
section: "Security Digest"
date_published: 2025-09-29
date_modified: 2025-09-29
publisher: erroneo.us
author: erroneo.us Security Desk
ghsa: "GHSA-pwf7-47c3-mfhx"
license: All rights reserved. Quote with attribution and a link.
---

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

## Affected packages

- GitHub Actions `j178/prek-action` <= 1.0.5 → fixed: 1.0.6

## 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.extraargs, and inputs.extra-args can be used to execute arbitrary code in the context of the action. PoC The previous example will print all the environment variables, and it will expose MYSECRET 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

## Sources

- [GitHub Advisory GHSA-pwf7-47c3-mfhx](https://github.com/advisories/GHSA-pwf7-47c3-mfhx)
- [github.com](https://github.com/j178/prek-action/security/advisories/GHSA-pwf7-47c3-mfhx)
- [github.com](https://github.com/j178/prek-action/commit/6b7c6ef5c3875c766893b881b40773cd5605bde3)

---
Source page: https://erroneo.us/security/ghsa/GHSA-pwf7-47c3-mfhx/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
