# CVE-2026-5366: Git Argument Injection in prefecthq/prefect

> CVE-2026-5366: Git Argument Injection in prefecthq/prefect. CVSS 9.9 (CVSS 3.1).

Canonical: https://rewindex.com/cve/CVE-2026-5366
Last updated: 2026-07-01T18:50:25Z

- Published: 2026-06-20 16:43 UTC · Updated: 2026-07-01 18:50 UTC · Assigner: @huntr\_ai
- CVSS: 9.9 (CVSS 3.1) · Severity: Critical · Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- EPSS: 1.0%, 64th percentile (scored 2026-10-25)
- CISA KEV: no
- CWE: CWE-94

## Description

Prefect version 3.6.23 is vulnerable to remote code execution due to improper handling of user-controlled input in the \`GitRepository\` storage class. The \`commit\_sha\` parameter, which is passed to git commands, lacks validation and does not include a \`--\` separator to distinguish user input from git flags. This allows attackers to inject arbitrary git flags, such as \`--upload-pack\`, enabling execution of external programs. Additionally, the \`directories\` parameter can be exploited to inject git flags during sparse-checkout operations. These vulnerabilities allow any user with deployment creation permissions to execute arbitrary commands on worker machines, compromising shared work pools in multi-tenant environments.

## Affected vendors and products

- prefecthq: prefecthq/prefect

## Tracked companies

- [Prefect](https://rewindex.com/company/prefect.md)

## References

- [CVE record on cve.org](https://www.cve.org/CVERecord?id=CVE-2026-5366)
- [NVD entry](https://nvd.nist.gov/vuln/detail/CVE-2026-5366)
- [https://huntr.com/bounties/e2e88a0f-a8f6-49c9-94c5-e98dc385f07a](https://huntr.com/bounties/e2e88a0f-a8f6-49c9-94c5-e98dc385f07a)

---

_Sources: CVE records from the CVE Program (cve.org). CVE® is a registered trademark of The MITRE Corporation. (https://www.cve.org/) This product uses data from the NVD API but is not endorsed or certified by the NVD. (https://nvd.nist.gov/) Known Exploited Vulnerabilities catalog from CISA. (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) EPSS scores from FIRST (Exploit Prediction Scoring System). (https://www.first.org/epss/)_


---
Canonical: https://rewindex.com/cve/CVE-2026-5366 · Markdown: https://rewindex.com/cve/CVE-2026-5366.md · JSON: https://rewindex.com/api/v1/cves/CVE-2026-5366 · Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) · Generated 2026-10-26T01:58:50.186Z
