CVE-2026-5366 Details
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.
A remote code execution vulnerability exists in Prefect version 3.6.23, specifically within the 'GitRepository' storage class. The issue arises from improper handling of user-controlled input in the 'commit_sha' parameter, which is passed to git commands without validation or a separator to distinguish between user input and git flags. This flaw allows attackers to inject arbitrary git flags, such as '--upload-pack', which can execute external programs. Additionally, the 'directories' parameter can be manipulated to inject git flags during sparse-checkout operations. As a result, any user with permission to create deployments can execute arbitrary commands on worker machines, jeopardizing shared work pools in multi-tenant environments.
It is recommended to add a separator before all user-controlled positional arguments in git commands and to validate the format of the 'commit_sha' parameter before use.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jun 22, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://huntr.com/bounties/e2e88a0f-a8f6-49c9-94c5-e98dc385f07a | CISA-ADP | ExploitThird Party Advisory |
| https://huntr.com/bounties/e2e88a0f-a8f6-49c9-94c5-e98dc385f07a | [email protected] | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| prefect prefect | 3.6.23 - |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 1, 2026 | Initial Analysis | [email protected] |
| Jun 22, 2026 | CVE Modified | CISA-ADP |
| Jun 20, 2026 | New CVE Received | [email protected] |