Skip to main content
CVE-2026-5366VulnerabilityPublished Updated

Prefect has Git Flag Injection via commit_sha and directories Parameters Leading to Remote Code Execution (RCE)

Affects prefectSource GCVE Database

0
Compare
Authoritative record:CVE-2026-5366· Critical 9.9

Not known to be exploited · CVSS 9.9 Critical : upgrade to 3.6.25 as a priority.

Data as of 3 Nov 2026, 22:58 UTC

CVSS 3.0 base score
9.9Critical
How severe the flaw is on the 0–10 CVSS scale.
EPSS
1.0% chance of exploitation in 30 days – higher than 63% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 3.6.25
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 20 Jun 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 3 Nov 2026.

What to do

Upgrade prefect to 3.6.25.

Affected software

ProductAffectedFixed in
PyPIprefectAffected
  • >=3.1.11 <3.6.25
Fixed in
  • 3.6.25

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

Prefect versions 3.1.11 through 3.6.24 are 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.

References

Community reviews

Loading reviews…