patchminder
Proof of concept · GitHub CVE-2026-5366

Remote code executionin PrefectHQ Prefect.

Published 20 Jun 2026 · Updated 22 Jun 2026 · Every fact sourced

JSONCite
Is it exploited?
Not confirmed

Proof of concept public (GitHub).

Attack code is public
Severity
Critical 9.9
CVSSA severity score from 0 to 10. 9 and higher is critical. 3.0
Attack likelihood
Low
EPSSA daily score from FIRST: the chance a hole is attacked in the next 30 days. 0.9% chance in 30 days · 4 Dec 2026
Fix
Available
Upgrade to 3.6.25 or later
In plain words

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.

What to do now
  • Upgrade prefect (PyPI) to 3.6.25 or later.
Versions

Affected and fixed versions

Product or package
Affected
Fixed in
Source
prefecthq/prefect
Not confirmed
Not confirmed
CVE record
prefect (PyPI)
3.1.11 to before 3.6.25
3.6.25
GitHub advisory

From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.

Timeline

From first report to first attacks

  1. 1 Apr 2026
    CVE ID reserved by @huntr_ai.
  2. 20 Jun 2026
    Published in the CVE List.
  3. 22 Jun 2026
    CVE record last updated.
  4. 27 Jun 2026
    First public proof of concept on GitHub.
Exploit code

Attack code anyone can find

Exploit maturity: Proof of concept (GitHub). CISA assessment (SSVC): exploitation poc.

Metasploit module
None known
Nuclei scan template
None known
Exploit-DB
None known
GitHub proof of concepts
1 repository
GitHubno warning signs foundrenat0z3r0/prefect-cve-2026-53660 stars · created 27 Jun 2026PoC for CVE-2026-5366: git argument injection in Prefect's GitRepository leading to RCE on the worker.

Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.

Related

Other Prefect vulnerabilities

Same weakness: Code injection

All CWE-94 vulnerabilities

References
Cite this page

Patchminder. CVE-2026-5366: Remote code execution in PrefectHQ Prefect. https://patchminder.com/cve/cve-2026-5366/ (accessed 5 December 2026).