Critical

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

  • Disclosed: 20.06.2026
  • Updated: 04.11.2026 00:17

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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) prefect >= 3.1.11, < 3.6.25 3.6.25

References

CVSS score 9.9/10
CVSS vector
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Weakness (CWE)
CWE-94
Platform
Python (PyPI)
Package
prefect
Disclosed
20.06.2026
Updated
04.11.2026 00:17

Sources and licenses

OSV / GitHub Advisory Database - GHSA-7pm4-56h2-5rxr - CC BY 4.0

Vulnerability history: prefect

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (9) in the archive
Total entries
9
First → latest
11.2023 06.2026
Without a fix
1
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 4
  • Medium 2
  • Low 2

Disclosures per year

  1. 2023: 1
  2. 2024: 0
  3. 2025: 1
  4. 2026: 7
Severity:
  1. Prefect has Git Flag Injection via commit_sha and directories Parameters Leading to Remote Code Execution (RCE) this entry
    Critical · 9.9 CVE-2026-5366 >= 3.1.11, < 3.6.25 3.6.25
  2. High · 8.5 CVE-2026-3515 <= 3.6.18 no fix
  3. High · 7.6 CVE-2024-8183 >= 3.0.0rc1, < 3.0.3, < 2.20.17 3.0.3, 2.20.17
  4. High · 8.8 CVE-2023-6022 >= 2.0.0, < 2.16.5 2.16.5

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.