Remote code executionin PrefectHQ Prefect.
Proof of concept public (GitHub).
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.
- Upgrade prefect (PyPI) to 3.6.25 or later.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 1 Apr 2026CVE ID reserved by @huntr_ai.
- 20 Jun 2026Published in the CVE List.
- 22 Jun 2026CVE record last updated.
- 27 Jun 2026First public proof of concept on GitHub.
Attack code anyone can find
Exploit maturity: Proof of concept (GitHub). CISA assessment (SSVC): exploitation poc.
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.
Report a link
Other Prefect vulnerabilities
Same weakness: Code injection
Patchminder. CVE-2026-5366: Remote code execution in PrefectHQ Prefect. https://patchminder.com/cve/cve-2026-5366/ (accessed 5 December 2026).