CVE-2026-5366
Git Argument Injection in prefecthq/prefect
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.
INFO
Published Date :
June 20, 2026, 5:16 p.m.
Last Modified :
July 1, 2026, 6:50 p.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.0 | CRITICAL | [email protected] |
Solution
- Update Prefect to a secure version.
- Validate all user-supplied git parameters.
- Ensure git commands use proper argument separation.
Public PoC/Exploit Available at Github
CVE-2026-5366 has a 3 public
PoC/Exploit available at Github.
Go to the Public Exploits tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-5366.
| URL | Resource |
|---|---|
| https://huntr.com/bounties/e2e88a0f-a8f6-49c9-94c5-e98dc385f07a | Exploit Third Party Advisory |
| https://huntr.com/bounties/e2e88a0f-a8f6-49c9-94c5-e98dc385f07a | Exploit Third Party Advisory |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-5366 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-5366
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
PoC for CVE-2026-5366: git argument injection in Prefect's GitRepository leading to RCE on the worker.
cve poc prefect rce security
Python Shell
PoC: CVE-2026-5366 — Git Argument Injection in Prefect (GitRepository)
📡 PoC auto collect from GitHub. ⚠️ Be careful Malware.
security cve exploit poc vulnerability
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-5366 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-5366 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Jul. 01, 2026
Action Type Old Value New Value Added CPE Configuration OR *cpe:2.3:a:prefect:prefect:3.6.23:-:*:*:*:*:*:* Added Reference Type huntr.dev: https://huntr.com/bounties/e2e88a0f-a8f6-49c9-94c5-e98dc385f07a Types: Exploit, Third Party Advisory Added Reference Type CISA-ADP: https://huntr.com/bounties/e2e88a0f-a8f6-49c9-94c5-e98dc385f07a Types: Exploit, Third Party Advisory -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 22, 2026
Action Type Old Value New Value Added Reference https://huntr.com/bounties/e2e88a0f-a8f6-49c9-94c5-e98dc385f07a Added SSVC {'id': 'CVE-2026-5366', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'poc'}, {'automatable': 'no'}, {'technicalImpact': 'total'}], 'version': '2.0.3', 'timestamp': '2026-06-22T17:24:58.249220Z'} -
New CVE Received by [email protected]
Jun. 20, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'prefecthq', 'product': 'prefecthq/prefect', 'versions': [{'status': 'affected', 'version': 'unspecified', 'versionType': 'custom', 'lessThanOrEqual': 'latest'}]}] Added 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. Added CVSS V3 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H Added CWE CWE-94 Added Reference https://huntr.com/bounties/e2e88a0f-a8f6-49c9-94c5-e98dc385f07a