Git Argument Injection in prefecthq/prefect
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-94.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| PrefectHQ | prefecthq/prefect | up to latest | — | No fix listed | CNA |
| — | prefect (PyPI) | 3.1.11 to before 3.6.25 | 3.6.25 | Patch available | GHSA-7pm4-56h2-5rxr |
- prefecthq/prefect VendorPrefectHQ Affected up to latest Fixed in — No fix listed CNA
- prefect (PyPI) Vendor— Affected 3.1.11 to before 3.6.25 Fixed in 3.6.25 Patch available GHSA-7pm4-56h2-5rxr
Remediation
- Fix · GHSA-7pm4-56h2-5rxr prefect (PyPI) Fixed in 3.6.25 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-5366
- 2026-10-03 Alias added: GHSA-7pm4-56h2-5rxr
- 2026-11-03 Fix available: PyPI/[email protected] · GHSA-7pm4-56h2-5rxr
- 2026-11-03 CVSS score added · GHSA-7pm4-56h2-5rxr
- 2026-11-03 Weakness changed · GHSA-7pm4-56h2-5rxr
- 2026-11-03 5 new references · GHSA-7pm4-56h2-5rxr
References
More PrefectHQ Prefect vulnerabilities
- TI-2026-03027 Authentication Bypass in prefecthq/prefect CVSS 3.0HIGH 7.5
- TI-2023-05548 Cross-Site Request Forgery (CSRF) in prefecthq/prefect CVSS 3.1HIGH 8.8
Sources
- CVE-2026-5366 · CVE Program
- CVE-2026-5366 · NVD
- FIRST EPSS
- GHSA-7pm4-56h2-5rxr · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences