9.9
CRITICAL CVSS 3.0
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 !
Affected Products

The following products are affected by CVE-2026-5366 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Prefect prefect
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
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 version that includes input validation for git commands.
  • 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

Updated: 4 weeks, 1 day ago
0 stars 0 fork 0 watcher
Born at : June 27, 2026, 1:41 p.m. This repo has been linked 1 different CVEs too.

PoC: CVE-2026-5366 — Git Argument Injection in Prefect (GitRepository)

Updated: 4 weeks, 1 day ago
0 stars 0 fork 0 watcher
Born at : June 27, 2026, 1:16 p.m. This repo has been linked 1 different CVEs too.

📡 PoC auto collect from GitHub. ⚠️ Be careful Malware.

security cve exploit poc vulnerability

Updated: 1 week ago
7922 stars 1275 fork 1275 watcher
Born at : Dec. 8, 2019, 1:03 p.m. This repo has been linked 646 different CVEs too.

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
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.