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.
Published: 2026-06-20
Score: 9.9 Critical
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Prefect 3.6.23 allows remote code execution because the GitRepository storage class passes a user‑controlled commit_sha value directly to git without validation or a separating double hyphen. Attackers can inject arbitrary git flags such as --upload-pack, which causes git to execute external programs. The directories parameter can similarly be abused during sparse‑checkout. Any user with deployment‑creation rights can use these inputs to run arbitrary commands on worker machines, subverting shared work‑pool isolation.

Affected Systems

The affected product is Prefect version 3.6.23 from prefecthq/prefect. No other versions or vendors are listed as affected. Users on that release should immediately verify the installed version.

Risk and Exploitability

The CVSS score of 9.9 indicates critical severity, and although EPSS information is not available, the lack of a KEV listing does not diminish the risk because the exploitation requires only deployment‑creation permissions, which, based on the description, is inferred to be granted broadly in multi‑tenant environments. An attacker who can create or modify a deployment can inject git flags and hence execute code on any worker executing that deployment. The impact is complete loss of confidentiality, integrity, and availability on those worker nodes, and the threat can affect all deployments within a shared pool.

Generated by OpenCVE AI on June 20, 2026 at 18:50 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply a patched version of Prefect that addresses the GitRepository input validation flaw.
  • Restrict deployment‑creation permissions to trusted users only.
  • Consider isolating worker machines into dedicated pools or disabling shared work pools to limit the reach of potential execution.

Generated by OpenCVE AI on June 20, 2026 at 18:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 20 Jun 2026 17:15:00 +0000

Type Values Removed Values Added
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.
Title Git Argument Injection in prefecthq/prefect
Weaknesses CWE-94
References
Metrics cvssV3_0

{'score': 9.9, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: @huntr_ai

Published:

Updated: 2026-06-20T16:43:37.345Z

Reserved: 2026-04-01T18:18:27.682Z

Link: CVE-2026-5366

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-20T19:00:05Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')