CVE-2026-5366

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.

Severity
CRITICAL
CVSS v3
9.9
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H · source cna
Exploit chance (EPSS)
1.034%
chance of exploitation in the next 30 days
higher than 64.4% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
Yes
Exploit references (NVD and CNA): 1
Metasploit modules: 0
Nuclei templates: 0

Weakness

CISA SSVC decision points

Exploitationpoc
Automatableno
Technical impacttotal
Scored2026-06-22

Timeline

  1. 2026-06-20Published by the CNA16:43 UTC
  2. 2026-06-20GitHub advisory published (GHSA-7pm4-56h2-5rxr)same day
  3. 2026-06-22CISA SSVC decision recorded2 days after publication

The timeline shows what already happened. To be told when this CVE changes next, watch it from the API.

Exploit and advisory records

GitHub advisory GHSA-7pm4-56h2-5rxr, affected packages:

PackageVulnerable versionsFixed in
PyPI prefectfrom 3.1.11 before 3.6.253.6.25

Affected products

Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.

ProductVulnerable versionsFixed in
prefect prefect3.6.23no fix listednot listed

Products and versions as NVD and the vendor that published the CVE list them.

References

Get more CVE data from the API.

Free without a key or signup. Pro adds monitoring and higher limits: pricing.

Sources