RCE in Prefect
CVE-2026-5366
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.
Vulnerability class: RCE (Remote Code Execution)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 9.9 (Critical). Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.
EPSS exploit prediction
EPSS: 0.010 (62.4th percentile), scored .
Low probability of exploitation in the next 30 days, but still tracked. 62nd percentile — 62.4% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.010 · newest: 0.010 · change: 0.000
Affected products
- Prefect — versions 3.6.23
- Prefecthq Prefecthq/prefect — versions unspecified
Weakness classification (CWE)
Public proof-of-concept exploits
References
- huntr.com/bounties/e2e88a0f-a8f6-49c9-94c5-e98dc385f07a (Exploit, Third Party Advisory)
Frequently asked questions
- What is CVE-2026-5366?
- CVE-2026-5366 is a critical-severity vulnerability in Prefect, classified under Code Injection. CVSS score: 9.9/10. Published 2026-06-20.
- How severe is CVE-2026-5366?
- Critical severity. CVSS v3 base score is 9.9 out of 10.
- Is CVE-2026-5366 known to be exploited?
- 1 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.