Prefect has Git Flag Injection via commit_sha and directories Parameters Leading to Remote Code Execution (RCE)
Affects prefectSource GCVE Database
Not known to be exploited · CVSS 9.9 Critical : upgrade to 3.6.25 as a priority.
Data as of 3 Nov 2026, 22:58 UTC
- EPSS
- 1.0% chance of exploitation in 30 days – higher than 63% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.6.25
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 20 Jun 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 3 Nov 2026.
What to do
Upgrade prefect to 3.6.25.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PyPIprefect | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
Prefect versions 3.1.11 through 3.6.24 are 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.
References
- nvd.nist.gov/vuln/detail/CVE-2026-5366 (opens in a new tab)
- github.com/PrefectHQ/prefect/pull/21384 (opens in a new tab)
- github.com/PrefectHQ/prefect/commit/6a9d9918716ce4ee0297b69f3046f7067ef1faae (opens in a new tab)
- github.com/PrefectHQ/prefect (opens in a new tab)
- huntr.com/bounties/e2e88a0f-a8f6-49c9-94c5-e98dc385f07a (opens in a new tab)