Skip to main content

CVE-2026-5366 — Vulnerability in prefect — CVE Details

CRITICAL

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

Published June 20, 2026Updated November 3, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (1.03%). Schedule for your next planned update.

Does your project use an affected prefect version?

Paste your requirements.txt to check it for CVE-2026-5366 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my requirements.txt

Summary

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.

Advisory Timeline

  • First published June 20, 2026 (159 days ago).
  • Last revised November 3, 2026 — 136 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

pip
Update prefect to 3.6.25 or later
pip install "prefect>=3.6.25"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: PyPI (1).

PackageFixed In
prefect PyPI · Affected: 3.1.11, 3.1.12, 3.1.12.dev1, 3.1.12.dev2 (+338 more)3.6.25

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.9 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-5366?
Prefect has Git Flag Injection via commit_sha and directories Parameters Leading to Remote Code Execution (RCE). This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.9/10).
How do I check if my project is affected by CVE-2026-5366?
CVE-2026-5366 affects prefect. It has a 1.0% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-5366 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.9

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
1.03%
EPSS percentile: 63.1

This is an above-median EPSS score — 63.1% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

GHSA-7pm4-56h2-5rxr

Related CVEs

  • CVE-2026-77359
    CRITICAL

    Jupyter MCP Server: Browser DNS rebinding can hijack the Jupyter backend through management routes

  • CVE-2026-77312
    CRITICAL

    Flyto2 Core: Arbitrary file write via unguarded data.*/file.* modules (incomplete fix of CVE-2026-67429)

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my requirements.txt