Skip to main content

Prefect EUVDEUVD-2026-38128

| CVE-2026-5366 CRITICAL
Code Injection (CWE-94)
2026-06-20 @huntr_ai GHSA-7pm4-56h2-5rxr
9.9
CVSS 3.0 · Vendor: huntr_ai
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain deployment-creation role in workspace
  2. Delivery
    Create deployment with GitRepository storage
  3. Exploit
    Inject `--upload-pack=<payload>` into commit_sha or flag into directories
  4. Execution
    Worker invokes git with attacker-controlled flag
  5. Persist
    git spawns attacker binary on worker host
  6. Impact
    Pivot to co-tenant secrets and flow code

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires (1) an account with permission to create or edit a Prefect deployment in the target workspace, (2) that deployment using the GitRepository storage class so the attacker-controlled commit_sha or directories values reach the git subprocess, and (3) a worker that subsequently picks up the run - most impactful when a single work pool is shared across tenants. There is no user interaction on a victim's side and no admin role needed (PR:L), but the flaw is gated by Prefect's RBAC for deployment authoring and does not affect installations where Git storage is unused or where deployments are managed exclusively by trusted operators.

Impact

The supplied CVSS:3.0 vector AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H (9.9) is consistent with the description: an authenticated low-privilege Prefect user reaches the worker over the network through deployment configuration, breaks out of the Prefect trust scope onto the worker host, and gains full CIA impact - the scope change is genuine because the attacker's principal differs from the compromised worker. EPSS, KEV, and POC signals are all absent from the input, so this is not known to be actively exploited; however, the prerequisite is merely "deployment creation" which is a routine collaborator permission in multi-tenant Prefect Cloud/Server installs, making real-world risk high wherever workers are shared. The dominant uncertainty is the patched version: the only references are a huntr bounty page, an NVD link, and a VulDB entry - no PrefectHQ advisory or release tag is cited, so defenders cannot yet pin the exact fixed build from this data.

Exploit ScenarioDerived

A developer with deployment-creation rights in a shared Prefect workspace creates a deployment whose GitRepository.commit_sha is set to something like --upload-pack=/tmp/payload.sh (or a similar --exec/--upload-pack flag), pointing the git remote at an attacker-controlled URL. When any tenant's flow run is scheduled onto the shared worker, the worker invokes git with the injected flag, executing the attacker's binary as the worker process and yielding code execution on the host. From there the attacker can pivot to other tenants' flow code, credentials, and result stores co-located on the worker.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 22, 2026

Remote code execution in Prefect 3.6.23 allows any user holding deployment-creation permissions to run arbitrary commands on shared worker machines by abusing the GitRepository storage class. The commit_sha and directories parameters are concatenated into git invocations without a -- separator or validation, letting attackers smuggle flags such as --upload-pack to execute external programs. No public exploit identified at time of analysis, but the bug was reported via huntr and is particularly dangerous for multi-tenant work pools where worker compromise crosses trust boundaries.

RemediationAI

No vendor-released patch identified at time of analysis; monitor https://huntr.com/bounties/e2e88a0f-a8f6-49c9-94c5-e98dc385f07a, https://nvd.nist.gov/vuln/detail/CVE-2026-5366, and the PrefectHQ release notes for a fixed version above 3.6.23 and upgrade as soon as it is published. Until then, the most effective compensating control is to stop accepting untrusted commit_sha and directories values: restrict deployment-creation permissions to a small, trusted set of operators in shared work pools (side effect - collaborators lose self-service deployments), or pre-define deployments centrally and have low-trust users only trigger them. Operators can also isolate workers per tenant so a successful injection only compromises that tenant's runner, run workers as unprivileged users in ephemeral containers with no outbound egress beyond the required Git remote, and add an admission check that rejects commit_sha or directories values containing - as a leading character or = mid-string - recognising this is a fragile denylist that may break legitimate but unusual branch/path inputs.

Affected VersionsENISA

prefecthq/prefect unspecified ≤latest

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Prefect is an open-source workflow orchestration platform from PrefectHQ (CPE cpe:2.3:a:prefecthq:prefecthq/prefect) where deployments can pull flow code from a Git repository via the GitRepository storage class. That class shells out to git with user-supplied values for commit_sha (used with checkout/fetch) and directories (used with sparse-checkout), and because git treats any argument beginning with -- as an option, omitting the -- end-of-options sentinel turns those positional inputs into option-injection sinks. The root cause maps to CWE-94 (Improper Control of Generation of Code) - specifically argument injection into a subprocess - and flags like git fetch --upload-pack=<cmd> or --exec=<cmd> cause git to spawn an arbitrary external program with the worker's privileges.

Know when Prefecthq Prefect gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (huntr_ai) PRIMARY 9.9 CRITICAL
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
vuln.today AI 9.9 CRITICAL

Network-reachable Prefect API, low-priv deployment author (PR:L), no UI; argument injection breaks out of Prefect's auth scope onto the worker (S:C) with full RCE giving high CIA.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Primary rating from Vendor (huntr_ai).

CVSS VectorVendor: huntr_ai

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

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Prefect 3.6.23 contains a critical remote code execution vulnerability accessible to any user with deployment-creation permissions, enabling execution of arbitrary commands on shared worker machines. This immediately threatens organizations using Prefect in multi-tenant or shared worker environments, potentially compromising infrastructure, data, and operational continuity across deployment boundaries. Immediate containment of deployment permissions and worker isolation are required pending vendor remediation.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict deployment-creation permissions to trusted administrators only; (2) Implement network segmentation isolating worker machines from sensitive systems and data stores; (3) Deploy endpoint detection and response (EDR) on workers to detect anomalous process execution and git flag injection; (4) Enforce mandatory approval workflows for all GitRepository storage deployments; (5) Enable and actively monitor audit logging for git-related operations on workers; (6) Evaluate temporary suspension of GitRepository storage class usage until patch is available.

Threat Intelligence Overview

EPSS Score
0.6%
Top 57% exploitable
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.6%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

51
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +50
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy